Teradata: First and Last Day

Teradata: First and Last Day

Teradata provides a way to truncate dates to the start of the week, month, quarter and year. This can achieved using inbuilt TRUNC function.


Syntax: TRUNC(date_column, Trunc_keyword) 


Below tables show most of the metacharacters that can used for Trunc_keyword.

All the below examples can be used with any DATE column (i.e CURRENT_DATE can be replaced with column of DATE datatype).