Hello,
I'm trying to separate a given time in hours & minutes.
Let's say for example that I've worked 7 hours and 30 minutes. Therefore text box txtworked = 07:30.
vtimeworked = txtworked
vhrs = Format(vtimeworked, "hh") 'results in 07 = ok
vmin = Format(vtimeworked, "mm") 'should be 30 but instead I'm getting 12
My question, why do I keep getting 12 as a value and how can I fix it.
Kind regards,
Hans
I'm trying to separate a given time in hours & minutes.
Let's say for example that I've worked 7 hours and 30 minutes. Therefore text box txtworked = 07:30.
vtimeworked = txtworked
vhrs = Format(vtimeworked, "hh") 'results in 07 = ok
vmin = Format(vtimeworked, "mm") 'should be 30 but instead I'm getting 12
My question, why do I keep getting 12 as a value and how can I fix it.
Kind regards,
Hans