calculating time waiting (1 Viewer)

dbertanjoli

Registered User.
Local time
Today, 17:44
Joined
Sep 22, 2000
Messages
102
Hello, in my form I have two fields: date booked (surgery) and wait time. I would like my wait time field to caculate days someone is waiting for surgery based on date booked and today?

Many thanks,
Debbie
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 09:44
Joined
Aug 30, 2003
Messages
36,140
Sure; look at the DateDiff function in Help.
 

dbertanjoli

Registered User.
Local time
Today, 17:44
Joined
Sep 22, 2000
Messages
102
many thanks, but how to used datediff to calucate days and months of wait based on date booked?

Deb
 

MSAccessRookie

AWF VIP
Local time
Today, 12:44
Joined
May 2, 2008
Messages
3,428
Format for datediff

Assuming DateBooked is a Date/Time variable type, you could use the following:

datediff({Interval},
DateBooked, SecondDate) WHERE

Interval is:

"d" for day
"ww" for week
"m" for Month
"y" for Year

would give you the time between the two dates. There are additional intervals as well
 

Users who are viewing this thread

Top Bottom