DateDiff() is usually used to perform date difference calculations. But for simple difference calculations you can subtract dates from each other, like this:

#Now()-mydate# days since #DateFormat(mydate)#

The returned number will likely not be an integer, and will contain date fractions too, so you may want to use Int() to round the number to just the integer portion:

#Int(Now()-mydate)#

4 thoughts

  1. Along those same lines, people can simply subtract days from a date. Since integers (in many cases) are a valid form of fractional date as a whole as well as time spans, (ie. 1.0 = 1 day, 2.0 = 2 days) the math should work out nicely:
    (Now() – 1) === > Yesterday
    (Now() + 1) === > Tomorrow

Leave a Reply to Ben Forta Cancel reply