DAX Function Guide

TIME
Empty image or helper icon

Sam McKay

CEO & Founder

How does the TIME work?
The TIME function (DAX) returns a decimal number between 0 and 0.999988426 given an hour, minute and second value. A result of 0 represents 12:00:00 AM and a result of 0.999988426 represents 11:59:59 PM.
TIME Formula Syntax

TIME (
     hour, minute, second
)

How do you use the TIME?

The TIME function creates a date in serial number format from the hourminute, and second components you specify. Use it to create a valid time when you have (or can supply) these component values separately. Once you have a valid time, you can format it any way you like

Considerations when using the TIME?

You can supply the arguments to the TIME function as values that you type directly, as the result of another expression, or by a reference to a column that contains a numeric value. The following restrictions apply:

  • Any value for hours that is greater than 23 will be divided by 24 and the remainder will be treated as the hour value.
  • Any value for minutes that is greater than 59 will be converted to hours and minutes.
  • Any value for seconds that is greater than 59 will be converted to hours, minutes, and seconds.
  • For minutes or seconds, a value greater than 24 hours will be divided by 24 and the reminder will be treated as the hour value. A value in excess of 24 hours does not alter the date portion.

To improve readability of the time values returned by this function, we recommend that you format the column or PivotTable cell that contains the results of the formula by using one of the time formats provided by Microsoft Excel.

Related Video Tutorials
Empty image or helper icon
Empty image or helper icon
Empty image or helper icon
Formula examples using the TIME

=TIME([intHours],[intMinutes],[intSeconds])

=TIME(0,750,0) =TIME(12,30,0)

=TIME(27,0,0) =TIME(3,0,0)

Related Courses
beginner
Course Cover: Beginners Guide To DAX
Total points: 508 XP 04:26 hours

Beginners Guide To DAX

intermediate
Course Cover: Mastering DAX Calculations
Total points: 1390 XP 12:17 hours

Mastering DAX Calculations

intermediate
Course Cover: DAX Formula Patterns
Total points: 728 XP 04:55 hours

DAX Formula Patterns