trunc
function
Returns a date with the a portion of the date truncated to the unit specified by the format model fmt
.
Returns
A DATE.
fmt
must be one of (case insensitive):
'YEAR'
,'YYYY'
,'YY'
- truncate to the first date of the year that the date falls in.'QUARTER'
- truncate to the first date of the quarter that the date falls in.'MONTH'
,'MM'
,'MON'
- truncate to the first date of the month that the date falls in.'WEEK'
- truncate to the Monday of the week that the date falls in.