DateDiff won't work in query expression

B

Bill

I created a query expression that will not work and I
can't understand why.
AgeatYrEntry: DateDiff("y",[DOB],[02-03 Entry Date])
Where DOB is the person's date of birth and 02-03 Entry
Date is the date they entered our program. The result is
a number in the 1000's, and the answer should be in the
teens. Is this not working because of the fact that their
DOB is before 2000 and their entry date is after 2000?
Bill
 
R

Rick Brandt

Bill said:
I created a query expression that will not work and I
can't understand why.
AgeatYrEntry: DateDiff("y",[DOB],[02-03 Entry Date])
Where DOB is the person's date of birth and 02-03 Entry
Date is the date they entered our program. The result is
a number in the 1000's, and the answer should be in the
teens. Is this not working because of the fact that their
DOB is before 2000 and their entry date is after 2000?
Bill

You need "yyyy" for year, "y" is day-of-year and will give you the result in days.
 

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

Top