DateDiff

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

Guest

I have two fields that show year and month and I want to display the variance
between them. The problem is that they are text fields instead of date
fields. Could anyone please let me know how to convert to date and use the
DateDiff function? e.g. RptDate JrnlDate
200702 200612 Thanks, Claire
 
Hi Claire

Use the Date Serial function:

DateSerial(Val(Left(fieldname,4)),Val(Right(fieldname,2)),1)

HTH
Scott<>
Microsoft Access MVP 2007
 

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