Skip to main content
NOW
Tom Williams avatar
Written by Tom Williams
Updated over a year ago

Type: Function

Function: NOW

Syntax: NOW()

Description: Returns the current datetime. It is useful as a fallback or anchor when calculating durations.

Sample usage:

  • (NOW()-created_at)/DAY() returns the elapsed time in days since the creation of a record.

  • IF_NULL(merged_at, NOW()) - created_at uses the current datetime to perform the calculation if merged_at is null on the record (the record is an issue or the pull request has not been merged).

Did this answer your question?