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​
Type | Parameter | Description |
---|---|---|
Integer | year | The year to set for the date. |
Integer | month | The month to set for the date. The month is zero-based, so January is 0 and December is 11. |
Integer | day | The day to set for the date. The day is one-based, so the first day of the month is 1. |
Returns​
Date - A date object created from the specified year, month, and day, with the time set to midnight of that day.
Examples​
Code Snippet
getDate(2016, 11, 1) //This example will create a new date object set to December 1st, 2016.