startOfYear

Applies start of year modifier to a date/time value.

This function translates to the 'start of year' modifier in SQLite's date and time functions. It rewinds the date to the beginning of the year it is in. For example, if the date is '2024-07-15', applying this modifier will change it to '2024-01-01'.

Example

// Get the first day of the current year
select(DATE().now().startOfYear()).execute()

Return

A KQLiteColumn with the 'start of year' modifier applied.

Author

MOHAMMAD AZIM ANSARI

See also