3.5.1.2.5 Hour


Description

Returns the hour as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).


See this note.

Syntax

int Hour(double d)

Parameters

d

Julian date-value, which can include time

Return

If input is a valid Julian-date value, returns the hour, 0 (12:00 A.M.) to 23 (11:00 P.M.).

If input is not a valid Julian-date value, returns -1.

Example

int aa = Hour(0.6997854);
aa = ;//Should return the hour of this time, 16.
int bb = Hour(2454827.5982639);
bb = ; //Should return the hour of this time, 14.

See Also

Year, Month, Day, Minute, Second, Now