Time diffrence

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to calculate the diff between two time fields as you would with date
diff. The two feilds are set to time/date.
 
Hi,


A simple subtraction supply the result in days and decimal of day (0.5 =
12 hours; 0.25 = 6 hours, etc).


Hoping it may help,
Vanderghast, Access MVP
 
I need to calculate the diff between two time fields as you would with date
diff. The two feilds are set to time/date.

DateDiff has arguments to calculate differences in any time unit from
seconds to years. There is no such thing as a "date field" or a "time
field" - any date/time datatype is stored as a Double Float count of
days and fractions of a day since midnight, December 30, 1899.

DateDiff("s", [datetimefield], [anotherdatetime])

will get the number of seconds; "n" will get miNutes, "h" Hours, "d"
Days, "w" Weeks, "m" Months and so on.
 
Back
Top