hours to minutes

  • Thread starter Thread starter Gianni
  • Start date Start date
Assuming that the string always contains a . to separate hours and minutes:

TheMinutes: (Left([FieldName], InStr([FieldName], ".") - 1) * 60) +
Val(Mid([FieldName], InStr([FieldName], ".") + 1))
 
I assume the "02.32 h" is actually Text.

If you *always* have 2 digits for the hours and 2 digits for the mins in the
posted format, you can use:

Val(Left([TimeText], 2)) * 60 + Val(Mid([TimeText], 4, 2))

to get the number of minutes.
 

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

Back
Top