Formating Unix Time

  • Thread starter Thread starter AC
  • Start date Start date
A

AC

I'm working in Access to rebuild some reports that came in
a reporting utility. The data in Access is pulled from
another database. The times are all in Unix. I need to
collect the duration tickets were open and make it look
presentable to manager types. In my query I have field
that simply does [close date] - [open date] to get the
duration.

How can I change Unix the time to simple
days:hours:minutes format?

The Access functions I've looked at all give just a date
and not duration.

Thanks!
AC
 
AC:

Time duration in Access is best calced on the total minutes or total seconds
level and then doing simple math to determine the number hours (and/or
minutes) etc.
 
AC said:
I'm working in Access to rebuild some reports that came in
a reporting utility. The data in Access is pulled from
another database. The times are all in Unix. I need to
collect the duration tickets were open and make it look
presentable to manager types. In my query I have field
that simply does [close date] - [open date] to get the
duration.

How can I change Unix the time to simple
days:hours:minutes format?

The Access functions I've looked at all give just a date
and not duration.

I have a vague memory that unix dates are stored as the
number of seconds since a base date (1/1/1970??). That
would mean that a duration (difference of two dates) is just
a number of seconds. It's easy enough to use simple
arithmetic to convert the seconds to whatever units you want
to display.

I don't know how fancy you want to get in suppressing units
with a zero value, but ignoring that issue it might be
something like:

tm \ 86400 & ":" & tm \ 3600 Mod 24 & ":" & tm \ 60 Mod 60

where tm is your duration field's name.
 
Back
Top