Skip to main content
Version: 8.1

getDate

This function is used by Ignition's Expression language.

Description​

Creates a new date object given a year, month and a day. The time will be set to midnight of that day.

Syntax​

getDate(year, month, day)

  • Parameters

    • Integer year - The year that the date will be set to.

    • Integer month - The month that the date will be set to. The month is zero-based, so January is 0 and December is 11

    • Integer day - The day that the date will be set to. The day is one-based, so the first day of the month is 1.

  • Results

    • Date - The date created from the specified integers.

Code Examples​

Code Snippet
getDate(2016, 11, 1) //This example will create a new date object set to December 1st, 2016.