Can someone pleae show me how to convert a decimal number to time in
VBA
0.249999999966667 = 6:00:00
Thanks In advance
---
That value is already equivalent to 6AM because of how Excel stores and
displays dates and times.
If you do something like:
Const dectime As Date = 0.249999999966667
MsgBox ("The time is: " & dectime)
The box will display: The time is 6:00:00 AM.
Since that's not quite what you specified, you'd need to format it more
precisely:
MsgBox ("The time is: " & Format(dectime, "h:mm:ss"))
In the latter case, dectime can be either a Date or a Double number type.
--ron