Returns a whole number between 0 and 23, inclusive, representing the hour of the day.
Hour(time)
time: Date, Variant, or String
The time argument is any expression that can represent a time. If time contains Null, Null is returned.
The following example uses the Hour function to obtain the hour from the current time:
Debug.Show
Local z As Date, x%
z = HmsToTime(110000, 20, 4000)
Trace z
Trace Hour(z)
Trace Hour(#16:24:12#)
Trace Hour(Now)
Trace Hour(Time)
Trace Hour(FileDateTime("c:\windows\notepad.exe"))
The format of the output can be changed with the using of Mode Date..., Mode Format..., Format....
CDate(), Date, Date$, DateAdd(), DateDiff(), DatePart(), DateSerial(), DateTime$(), DateToDmy, DateToDmyHms, DateValue(), Day(), DayNo(), DmyHmsToDate(), DmyToDate(), HmsToTime(), Hour(), IsDate(), Minute(), Month(), Now, Now$(), TimeSerial(), TimeToHms, TimeValue(), Second(), Week(), WeekDay(), Year()
{Created by Sjouke Hamstra; Last updated: 09/10/2014 by James Gaite}