Time Calculations

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

Guest

Good morning,

I have a listing containing the following data:
PT CONTDTD VISDTD
100100001 20030430 20020417
100100002 20030530 20020531
100100003 20030910 20020822
I need to know records that are greater then 11 months as well as those
records that are not.

I tried running DateDiff, but my query was unsuccessful.

Thank you,

Fred
 
Apparently these are Text or Number fields, and you need to convert them
into dates.

Try typing an expression like this into the Field row in your query:
CDate(Format([ContDTD], "0000\/00\/00"))

If that gives the correct date, you can do the same thing for the VisDTD
field, and then use DateDiff() to get the difference in months.
 
Thank you!

Allen Browne said:
Apparently these are Text or Number fields, and you need to convert them
into dates.

Try typing an expression like this into the Field row in your query:
CDate(Format([ContDTD], "0000\/00\/00"))

If that gives the correct date, you can do the same thing for the VisDTD
field, and then use DateDiff() to get the difference in months.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

fgwiii said:
Good morning,

I have a listing containing the following data:
PT CONTDTD VISDTD
100100001 20030430 20020417
100100002 20030530 20020531
100100003 20030910 20020822
I need to know records that are greater then 11 months as well as those
records that are not.

I tried running DateDiff, but my query was unsuccessful.

Thank you,

Fred
 

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

Similar Threads


Back
Top