Calculating Time Help

  • Thread starter Thread starter Floyd Forbes
  • Start date Start date
F

Floyd Forbes

I have two textboxes with sTime and eTime. If I enter time as decimal how do
I
calculate time.e.g

sTime = 7.00
eTime = 1.00
TotalTime = 6.00

Floyd
 
I have two textboxes with sTime and eTime. If I enter time as decimal how do
I
calculate time.e.g

sTime = 7.00
eTime = 1.00
TotalTime = 6.00

Floyd

Well... time isn't really decimal. is 1.00 1AM? or 1PM? Is 1.00 later than
11.00 or two hours earlier? Do your times ever span midnight?

If it's decimal numbers... just subtract. 7.00 - 1.00 is in fact 6.00. If
it's actually times of day, consider using a Date/Time field storing the date
and time (so that #11/20/2007 1:00:00# is actually two hours after #11/19/2007
23:00:00#) and using DateDiff() to calculate the time between.

John W. Vinson [MVP]
 
Back
Top