TIMEVALUE

Updated on

TIMEVALUE is a DAX function that converts a time expressed as text into a time value in datetime format.

Syntax

TIMEVALUE( TimeText )
Argument Properties Description
TimeText A text string that gives a time; date information in the string is ignored.

Return Values

A date (datetime).

Remarks

  • Time values are a portion of a date value and represented by a decimal number. For example, 12:00 PM is represented as 0.5 because it is half of a day.

  • When the time_text argument is a text representation of the date and time, the function uses the locale and date/time settings of the model 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.

  • Date and datetime can also be specified as a literal in the format dt"YYYY-MM-DD", dt"YYYY-MM-DDThh:mm:ss", or dt"YYYY-MM-DD hh:mm:ss". When specified as a literal, using the TIMEVALUE function in the expression is not necessary. To learn more, see DAX Syntax | Date and time.

Example

= TIMEVALUE("20:45:30")

Other functions related to TIMEVALUE are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/timevalue-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy