OpenBI Docs Buy

TIMEVALUE

A time read from text, its date dropped.

Group: Date and time. Compatible with DAX.

Syntax

TIMEVALUE ( <time_text> )
ParameterTypeDescription
time_textTextText that holds a time, with or without a date.

Returns

Date and time. The time the text names, on 30 December 1899.

Remarks

  • A date in the text is dropped; a text with a date only gives 00:00.
  • Both 14:30 and 2:30 PM are read.
  • The text is read the way the model's culture writes times; text that is no time is an error.
  • A blank gives BLANK.

Examples

Three ways to write a time

EVALUATE
ROW (
    "24-hour", TIMEVALUE ( "14:30" ),
    "AM and PM", TIMEVALUE ( "2:30 PM" ),
    "With a date", TIMEVALUE ( "2024-03-15 14:30:20" )
)
24-hourAM and PMWith a date
1899-12-30 14:30:001899-12-30 14:30:001899-12-30 14:30:20

A time as hours

EVALUATE
ROW ( "Hours", TIMEVALUE ( "06:45" ) * 24 )
Hours
6.75

TIME, DATEVALUE, HOUR, VALUE.

Last updated · OpenBI Studio 0.3.74