Skip to main content
Version: 7.9

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

    • Date date - The date to set to midnight.
  • Results Date - The new date set to midnight.

Code Examples

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