DateDiff

N

nicknameClair

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
 
S

Scottgem

Hi Claire

Use the Date Serial function:

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

HTH
Scott<>
Microsoft Access MVP 2007
 
Top