trunc

Truncates "date_expression" using the format specified by "string_expression". For example, if "string_expression" is 'year', then "date_expression" is truncated to the first day of the year.

Syntax

trunc ( date_expression , string_expression )

Example

trunc ( 2003-08-22 , 'year' )

Result

Returns 2003-01-01.