|
|
|
|
<DateTime type>.ToEpoch (Function) In french: <Type DateHeure>.VersEpoch Converts a local datetime to Epoch format (number of time units since 01/01/1970 at 00h00 UTC). New in version 28MyDay is DateTime MyDay = "20170726100941" // Displays "1501056581" (in France) Info(MyDay.ToEpoch())
Syntax
<Result> = <Data to convert>.ToEpoch([<Conversion options>])
<Result>: 8-byte integer - Date and time in Epoch format (number of time units since 01/01/1970 at 00h00 UTC).
- -1 if an error occurred (invalid date and time).
<Data to convert>: DateTime variable DateTime variable that corresponds to the local date and time to convert. This parameter will be considered invalid in the following cases: - if the date is invalid or earlier than 01/01/1970. You can check the validity of a date using DateValid.
- if the time is invalid. You can check the validity of a time using TimeValid.
Remark: It is possible to use dates beyond 2038. <Conversion options>: Optional Integer constant Options for converting the date and time to Epoch format:
| | epochUnixMillisecond | The result will be expressed in milliseconds since 01/01/1970 at 00h00 UTC (time 0 in Unix). | epochUnixSecond (default value) | The result will be expressed in seconds since 01/01/1970 at 00h00 UTC (time 0 in Unix). |
Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|