Skip to main content

DateToEpoch

The DateToEpoch function returns the input date in number of milliseconds since January 01, 1970 00:00:00 UTC.

Prototype

    DateToEpoch(Date)

Arguments

    Date      Date      By value  

A valid Date, an expression or a variable (Studio Only) that evaluates a Date.

Returns

    Number

The number of milliseconds since January 01, 1970 00:00:00 UTC.

Exception

    Undefined

Undefined is returned if Date is Undefined or is not a Date.

Example 

    DateToEpoch (Date('012021' ; '' ))

This will return [1638316800000], i.e., the equivalent number of milliseconds since Jan 1 1970.