View Full Version : Years, months and days passed? (2)


Gram123
03-15-2001, 03:50 AM
Hi.
I'd like to be able to say that today is so many years, months & days since a specified date. Better yet, would be to include hours and minutes, or hours to 2 dps.
At present I can only count days, using:

=Date()-#13/02/99#+1 & " days"

I know I can use the DateDiff function as an alternative, and then I can specify the interval, e.g. I could specify hours as the interval and it would return the number of hours that have passed since that date.
But is there a way to specify multiple intervals?
I want it to return:

2 years, 1 month & 1 day

but certainly not:

2 years, 25 months & 761 days

which I imagine it would, if I entered all arguments into a single text box.

"llkhoutx" said that I should use DateDiff and then compute what I want from that result.

Does this mean I need to do separate controls for each interval?
And how would I 'compute' them?
Gram

DH
03-15-2001, 04:11 AM
Gram,

A quick thought try this link. http://www.mvps.org/access/datetime/index.htm
It has various date/time functions.

David

May well help until you receive further replies!!!!

Gram123
03-16-2001, 01:02 AM
Cheers David,
But they didn't have what I wanted.

Anyone else?

Gram