- DAX Functions Tutorial
- DAX Functions - Home
- DAX Functions - Introduction
- DAX Parameter Naming Conventions
- Description Structure
- DAX Functions - Aggregation
- DAX Functions - Filter
- DAX Functions - Time Intelligence
- DAX Functions - Date and Time
- DAX Functions - Information
- DAX Functions - Logical
- Math & Trigonometric Functions
- DAX Functions - Parent & Child
- DAX Functions - Statistical
- DAX Functions - Text
- DAX Functions - Other
- DAX Functions Useful Resources
- DAX Functions - Quick Guide
- DAX Functions - Useful Resources
- DAX Functions - Discussion
DAX Date & Time - HOUR function
Description
Returns the hour as an integer from 0 (12:00 A.M.) to 23 (11:00 P.M.).
Syntax
HOUR (<datetime>)
Parameters
Sr.No. | Parameter & Description |
---|---|
1 |
datetime A datetime value representing time. E.g. 18:15:00 or 6:48 P.M. |
Return Value
An integer from 0 to 23.
Remarks
The parameter to the DAX HOUR function is the time that contains the hour you want to find.
You can specify the time as one of the following −
- An output of a date/time function.
- An expression that returns a datetime value.
- A value in one of the accepted time formats.
- An accepted text representation of a time.
The HOUR function uses the locale and date/time settings of the client computer to understand the text value in order to perform the conversion. Most locales use the colon (:) as the time separator and any input text using colons as time separators will parse correctly. Review your locale settings to understand your results.
Example
= HOUR ("18:15:15") returns 18. = HOUR ("6:15:15") returns 6. = HOUR (NOW ()) returns 9, if NOW () returns 12/16/2016 9:02:12 AM.
dax_functions_date_time.htm
Advertisements