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 ifmerged_at
isnull
on the record (the record is an issue or the pull request has not been merged).