Skip to main content
Version: 8.1

midnight

This function is used by Ignition's Expression language.

Description​

Returns a copy of a date with the hour, minute, second, and millisecond fields set to zero.

Syntax​

midnight(date)

Parameters​

TypeParameterDescription
DatedateThe date to set to midnight.

Returns​

Date - A new date with the hour, minute, second, and millisecond fields set to zero.

Examples​

Code Snippet
midnight(now()) //This will take the current date and set the time to midnight