POWER
Tom Azernour avatar
Written by Tom Azernour
Updated over a week 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?