Time format

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

Guest

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?
 
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.
 
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")
 
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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Date format behavior 4
time format 1
Access Convert a decimal time to hours and minutes 2
Calculate a total for "Time" 3
Formatting Question 2
Time Management problems 4
the variance in days 5
Avg expression in a query 4

Back
Top