A datetime's hour.
Hour = SRP_DateTime("Hour", Datetime)
Returns
The hour component of an OI time.
Parameters
Parameter | Description |
---|---|
Datetime | A datetime in OI internal format. (REQUIRED) |
Remarks
The "Hour" service returns the hour component of an OI datetime. The result is an integer between 0 and 23 with 0 being the midnight hour and 23 being the 11pm hour. If an OI datetime represents March 30, 1978 at 12:41:08pm, this service would return 12. If the datetime is August 13, 3003 at 4:23:32pm, this service would return 16. If the given datetime not valid, "" is returned.
Examples
// Get the current hour Hour = SRP_DateTime("Hour", DateTime()) // Get the current hour in UTC Hour = SRP_DateTime("Hour", SRP_DateTime("Now", 1)) // Get a hard coded datetime's hour Hour = SRP_DateTime("Hour", -9519.67241898148) // Parse a datetime's hour Datetime = SRP_DateTime("Parse", "Thursday, March 30, 1978 at 12:41:08pm", "DDD, MMMM D, YYYY at h:mm:sstt") Hour = SRP_DateTime("Hour", Datetime)