DateDiff and todays date?

S

St.Phun

Hi I was wondering if anyone knew if AccessXP has a today function which
would allow one to calculate the elapsed number of days between dateX and
today. Would the expression be DateDiff (Today) - (DateX)?
Thanx
 
F

fredg

Hi I was wondering if anyone knew if AccessXP has a today function which
would allow one to calculate the elapsed number of days between dateX and
today. Would the expression be DateDiff (Today) - (DateX)?
Thanx

In days?
=DateDiff("d",[DateX],Date())
or..
=Date() - [DateX]
 
J

John Vinson

Hi I was wondering if anyone knew if AccessXP has a today function which
would allow one to calculate the elapsed number of days between dateX and
today. Would the expression be DateDiff (Today) - (DateX)?
Thanx

The DateDiff function takes three arguments: the unit of measurement
("s" is seconds, "yyyy" is years, "d" is days), and two date/time
fields. Try

DateDiff("d", [DateX], Date())


John W. Vinson[MVP]
 
S

St.Phun

Thanx I got it to work.
-St.Phun

John Vinson said:
Hi I was wondering if anyone knew if AccessXP has a today function which
would allow one to calculate the elapsed number of days between dateX and
today. Would the expression be DateDiff (Today) - (DateX)?
Thanx

The DateDiff function takes three arguments: the unit of measurement
("s" is seconds, "yyyy" is years, "d" is days), and two date/time
fields. Try

DateDiff("d", [DateX], Date())


John W. Vinson[MVP]
 
Top