The toDateDiff(...) function has two variations, not counting syntax variations. You can convert a String to a DateDiff. You can also convert an Integer to a DateDiff.
|
DateDiff String Value | Description |
"P12M" | 12 months. This will be normalized to 1 year. |
"-P6DT24H" | Negative 6 days and 24 hours. This will be normalized to negative 7 days. |
"PT27.50S" | 27.5 seconds. This will be represented as 27 seconds and 500 milliseconds. |
"P12MT90M" | 12 months and 90 minutes. This will be normalized to 1 year, 1 hour and 30 minutes. |
"P90D" | 90 days. The days will not be converted to months since the conversion would not be precise. |
"P1Y2M3DT4H5M6.007S" | 1 year, 2 months, 3 days, 4 hours, 5 minutes, 6 seconds and 7 milliseconds. |