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.
 
Back
Top