BEGINNING_OF_DAY
Tom Azernour avatar
Written by Tom Azernour
Updated over a week ago

Type: Function

Function: BEGINNING_OF_DAY

Syntax: BEGINNING_OF_DAY(datetime)

Description: Returns a datetime corresponding to the beginning of day for the provided datetime or NOW if no value is provided.

Sample usage:

  • BEGINNING_OF_DAY(created_at) returns the created_at field value set at midnight the same day. If created_at is equal to 2023-02-23T15:39:21Z then BEGINNING_OF_DAY(created_at) returns 2023-02-23T00:00:00Z.

  • BEGINNING_OF_DAY() is equal to BEGINNING_OF_DAY(NOW())

Did this answer your question?