Rounding Time
Hi,
Public Sub temp()
Dim the_value As Date
the_value = DateValue("05/18/2010 8:16:01")
MsgBox RoundTime(the_value, 15, True)
End Sub
The msgbox shows "05/18/2010"
It should show "05/18/2010 8:30"
I must be missing something here!!!
"John W. Vinson" wrote in message
...
On Tue, 18 May 2010 14:00:18 -0600, "Bre-x" wrote:
Hi, Thank you for answering my post
the RoundTime function is not working or I dont know how to use it
Dim the_value As Date
the_value = "05/18/2010 8:15:01"
msgbox RoundTime(the_value, 15, True)
this should show 8:30
Rigth?
You're passing it a text string. It's expecting a Date/Time value. Try
the_value = DateValue("05/18/2010 8:15:01")
If it doesn't work (it did for me...) post back with more details. What
happened? No result, wrong result, flames coming out of your monitor?
--
John W. Vinson [MVP]
|