Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine Time

Status
Not open for further replies.

Stangleboy

Programmer
May 6, 2002
76
US
I have 2 fields on my form and I need to calculate time. I have a StartTime (DD/MM/YYYY HH:MM) and a StopTime (DD/MM/YYYY HH:MM) and I need to determine how much time was spent in minutes in a separte field. This is a piece of cake in Excel but Access doesn't work the same. Help!
 
Access has similar abilities

DateAdd
DateDiff

In your case, DateDiff is more suited

DateDiff("n", StartTime, StopTime)

Richard
 
I am getting "#Name?" what format should this be fixed, standard or general format? Thanx!
 
make sure you put an = in front of the calculation. i.e., the control source for your text box should read:

=DateDiff("n", StartTime, StopTime)
 
Thank you both, I had another stupid moment with the "=" symbol.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top