Subtracting date and time (1 Viewer)

Carl_R

Registered User.
Local time
Today, 12:44
Joined
Aug 16, 2002
Messages
82
I've almost got this but seem to be a little stuck on the format part.

I am performing a simply date subtract in a query
Code:
Test: Format([OpenedDateTime]-1-[ClosedDateTime],"h,nn")

I am trying to format the result in hours and minutes - so 19/05/2008 09:10 - 21/05/2008 15:17 = 54:07

Any suggestions welcome.
 

RodgerDJr

Registered User.
Local time
Today, 06:44
Joined
Aug 5, 2008
Messages
33
You want to use DateDiff

DateDiff("n",[OpenedDateTime],[ClosedDateTime])

This will give it to you in minutes.
 

Carl_R

Registered User.
Local time
Today, 12:44
Joined
Aug 16, 2002
Messages
82
Perfect. I have used "h" to get the rounded hours
 

Users who are viewing this thread

Top Bottom