hours to minutes

K

Ken Snell [MVP]

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))
 
V

Van T. Dinh

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