Time format

J

Jay

Thank you.
My table has a field, named as TimeInSecond.
I want to change it's format to "hh:nn:ss". How can I do that in a new
caculated field using a calculated field?
 
R

Rick B

You are trying to display it in a specific format. You don't need to store
it that way.

Use the FORMAT in your forms, reports, and queries to affect the way your
field looks.
 
R

Rick B

Note: The following formula will display a field that stores number of
minutes in the hh:mm format. You can use this formula and modify it to meet
your needs...

=[SomeFieldName]\60 & Format([SomeFieldName] Mod 60, "\:00")
 
V

Van T. Dinh

Try:

DurationText: [TIS] \ 3600 & ":" & Format(([TIS] MOD 3600) \ 60, "00") & ":"
&
Format([TIS] MOD 60, "00")

(typed as one line in the Field row of your Query grid.)

A more efficient expression (but may be less accurate) is:

DurationText: Format([TIS] / (24 * 60 * 60), "hh:nn:ss")
 
Top