mins:secs convert to hrs:mins:secs

G

Guest

A field contains minutes and seconds. The minutes can be more than 60 and
these need formatting to show the hour.

For example "88:12" in minutes and seconds needs formatting to read as
"1:28:12" - one hour, 28 minutes and 12 seconds.

Ideally, for times under one hour, the formatting would look like "0:23:14"
so that a column of times would have a consistent appearance.

Should I create another field to read the first field and then format to
show what I really need, or can it be done in the original field, please?

A simple solution would be much appreciated. Thank you.
 
G

Guest

MyBe there is a better way, but you can try

int(left([FieldName] ,instr([FieldName],":")-1)/60) & ":" & left([FieldName]
,instr([FieldName],":")-1) mod int(left([FieldName]
,instr([FieldName],":")-1)/60)*60 & ":" & mid([FieldName]
,instr([FieldName],":")+1)
 

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

Top