K Ken Snell [MVP] Nov 11, 2005 #2 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))
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 Nov 11, 2005 #3 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.
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.