Returns the hour component of the given Date as a number.

See Sigma's Common Date Functions and Use Cases lab for more information about date functions, including use cases and exercises.

Usage

Hour(date, [timezone])

date (required) The Date from which to extract the hour component.

timezone (optional) Name of IANA time zone to get the date part at (e.g., “America/Los_Angeles”). When calculating a time zone, input dates are treated as UTC.

Example

Hour(Date("2007-08-14 07:11:00"))
  • Returns 7.

See Also


Was this page helpful?
Yes No