Table of contents
TOC
Collapse the table of content
Expand the table of content

Duration.FromText

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

About

Returns a Duration value from a text value.

Duration.FromText(duration as nullable text) as nullable duration  

Arguments

ArgumentDescription
DurationThe text to convert.

Duration settings

Format
[-]hh:mm[:ss]
[-]ddd.hh:mm[:ss]

Note: The values within brackets [] are optional.

Format parts

PartDescription
[-]The text value is prepended with an optional negative sign [-] to indicate a negative duration value.
[d]The [d] part represents the day portion of the duration value.
[m]The [m] part represents the minute portion of the duration value.
[s]The [s] part represents the second portion of the duration value.

Examples

Duration.FromText("15:35") equals 15 hours, 35 minutes  
Duration.FromText("2.15:00") equals 2 days, 15 hours  
© 2018 Microsoft