Converting seconds into Days, Hours, Minuites

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

Guest

I have performed a datediff on two dates / time values giving a result into
seconds and I wish to extract the day, hour and minuite portions in three
variables.

For example

if seconds = 86400 then days = 1, hours = 0, min = 0
if seconds = 86460 then days = 0 , hours = 0 min = 1
etc...
 
Seconds\86400 will return integer days

(Seconds Mod 86400) \ 3600 will return integer hours

(Seconds Mod 3600)\ 60 will return integer minutes

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top