--- title: "toMillis" description: "Converts a Date object to its millisecond value elapsed since January 1, 1970, 00:00:00 UTC (GMT)" --- # toMillis > Converts a Date object to its millisecond value elapsed since January 1, 1970, 00:00:00 UTC (GMT) **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 | Type | Parameter | Description | |------|-----------|-------------------------------------------| | Date | `date` | The 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 ```python title="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)) ```