setTime
This function is used by Ignition's Expression language.
Description​
Takes in a date, and returns a copy of it with the time fields set as specified. Note that the millisecond field is not preserved.
Syntax​
setTime(date, hour, minute, second)
Parameters
Date date - A starting date.
Integer hour - The value to set the hour field to.
Integer minute - The value to set the minute field to.
Integer second - The value to set the second field to.
Results
- Date - The new date with the time set as specified.
Code Examples​
Code Snippet
setTime({Root Container.Calendar.date}, 1, 37, 44) //This example will set the date object to the current date with the time set to 01:37:44.