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

    • Date date - The date to convert to epoch time.
  • Results

    • Integer - The number of milliseconds from epoch time of the given date.

Code 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))