Conversion Functions
Name(parameters) | Parameter Domain | Description | Example |
---|---|---|---|
date(from) |
date string |
convert from to a date |
date("2012-12-25") - date("2012-12-24") = duration("P1D") |
date(from) |
date and time |
convert from to a date (set time components to null) |
date( date and time("2012-12-25T11:00:00Z")) = date("2012-12-25") |
date and time(from) |
date time string |
convert from to a date and time |
date and time("2012-12-24T23:59:00") + duration("PT1M") = date and time("2012-12-25T00:00:00") |
time(from) |
time string |
convert from to time |
time("23:59:00") + duration("PT2M") = time("00:01:00") |
time(from) |
time, date and time |
convert from to time (ignoring date components) |
time( date and time("2012-12-25T11:00:00Z")) = time("11:00:00") |
number(from, grouping separator, decimal separator) |
number, separator, decimal notation |
convert from to a number |
number("1 000,0", " ", ",") = number("1,000.0", ",", ".") |
string(from) |
non-null |
convert from to a string |
string(1.1) = "1.1" string(null) = null |
duration(from) |
duration string |
convert from to a days and time or years and months duration |
|
years and months duration(from, to) |
both are date and time |
return years and months duration between from and to |
years and months duration( date("2011-12-22"), date("2013-08-24") ) = duration("P1Y8M") |