asMonths
Converts a duration from seconds to months.
Parameters
DURATION (number)
The number of seconds to convert.
START DATETIME (datetime or string)
Optional. The duration is calculated forward from this date.
Input a datetime object or a string in an automatically recognized datetime pattern.
Default: 1970-01-01
END DATETIME (datetime or string)
Optional. The duration is calculated backward from this date when no start date is specified.
Input a datetime object or a string in an automatically recognized datetime pattern.
Examples
ATL in Script | Result | Notes |
---|---|---|
| 1 | 2678400 = 31 days in seconds. This converts to 1 month when counting forward from Jan 1, 1970 (default value). |
| 1.1 | 2678400 = 31 days in seconds. This converts to 1.1 months when counting forward from a start date of Feb 1, 2019. |
| 1 | 2678400 = 31 days in seconds. This converts to 1 month when counting backward from an end date of Feb 1, 2019. |
Note
The END DATETIME value is ignored when a START DATETIME is specified.