Skip to main content
Version: 8.1

toMillis

This function is used by Ignition's Expression language.

Description​

Converts a date object to its millisecond value elapsed since January 1, 1970, 00:00:00 UTC (GMT).

Syntax​

toMillis(date)

Parameters​

TypeParameterDescription
DatedateThe date to convert to milliseconds since epoch time.

Returns​

Integer - The number of milliseconds since January 1, 1970, 00:00:00 UTC (GMT) for the given date.

Examples​

Code Snippet
// This will take the date Aug 22, 2017 at 14:35:25 PST and convert it to milliseconds from epoch time which is 1,500,767,134,000.
toMillis(setTime(getDate(2017, 6, 22), 16, 45, 34))