Date Validation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all

Basically im a student and i have been given a scenario for an exam. I have
got to enter validation. The sentence in the scenario is:

"Bookings cannot be accepted less than two weeks in advance as delegate
packs and training materials need to be prepared".

So ive gathered the validation needs to be something like Date()>=Date()+14

Can somebody please give me the correct validation so todays date must be
greater than or equal to the date in 2 weeks time.

Thanks

Regards Ben
 
It sounds to me that you want:

[TrainingCourseDate] >= Date() + 14

***when the Course Booking is being entered into the database***.

The more formal and syntactically correct expression is:

[TrainingCourseDate] >= DateAdd("d", 14, Date())
 
"Bookings cannot be accepted less than two weeks in advance as delegate
packs and training materials need to be prepared".

The more formal and syntactically correct expression is:

[TrainingCourseDate] >= DateAdd("d", 14, Date())

That's a matter of opinion <g>.

For me, this is more in line with the spec:

2 <= DATEDIFF('W', DATE(), [TrainingCourseDate])

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top