I need to only display records where datediff("d",date1,date2)>10
datediff is not "web compatible". What would be a workaround?
I need to only display records where datediff("d",date1,date2)>10
datediff is not "web compatible". What would be a workaround?
In Access, you can do date arithmetic directly with Date/Time values. So this expression will return 1.5:
Debug.Print #2001/01/02 12:00 PM# - #2001/01/01 00:00 AM#
If you're wanting a difference in whole days, see if the Int() function is available. In Access, this one returns 1:
Debug.Print Int(#2001/01/02 12:00 PM#) - Int(#2001/01/01 00:00 AM#)
Sorry I don't know what is web compatible.
For a web query, you don't have dateDiff() function, but as the others point out, a simple difference between the two values will give you the number of days.
So in the query builder just type in
DAYDIF: ([date2]-[date1])
And, in the criteria, you can go:
> 10