gersemale
09-23-2005, 07:20 AM
Hi,
I have a string in the format HH:MM:SS and require to format it to minutes.
EG: 10:30:30 = 630.5min
I have tried using TimeValue(myDate) *24 *60 which works fine except the format is not 24 hour clock format, and does not stop at 24.00.00. Thus for values such as 28.00.33 the above method will return an incorrect minutes value.
The last solution I can think of would be to tokenise the string using the delimiter ":" to break it up.
How do you do this in VBA?
Thanks,
ger
I have a string in the format HH:MM:SS and require to format it to minutes.
EG: 10:30:30 = 630.5min
I have tried using TimeValue(myDate) *24 *60 which works fine except the format is not 24 hour clock format, and does not stop at 24.00.00. Thus for values such as 28.00.33 the above method will return an incorrect minutes value.
The last solution I can think of would be to tokenise the string using the delimiter ":" to break it up.
How do you do this in VBA?
Thanks,
ger