Return the hour of the day (24 hour format - a number from 0 to 23) from a given time value.


   time_value  A valid time.


Dim intDemo
intDemo = Hour(dtmShiftEnd)
intDemo = Hour(#08:55:00 AM#)
intDemo = Hour(#30/12/2012 08:55:00 AM#)

Select * from orders where Hour(Order_date) = 17;

“What would be the use of immortality to a person who cannot use well a half an hour” ~ Ralph Waldo Emerson

Related VBScript commands

Day - Return the day of the month.
DatePart - Return part of a given date.
Minute - Return the minute of the hour.
GetDate.vbs - Return the current Year/month/Day and time.

Copyright © 1999-2024 SS64.com
Some rights reserved