TRUNC(Date) Function | SQL Date/Time Functions & Expressions | Teradata Vantage - TRUNC(Date) - Advanced SQL Engine - Teradata Database

SQL Date and Time Functions and Expressions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
xmd1556127764262.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1211
lifecycle
previous
Product Category
Teradata Vantageā„¢

Truncates date_value based on the format specified by fmt.

Syntax

[TD_SYSFNLIB.] TRUNC ( date_value [, fmt ] )
TD_SYSFNLIB.
Name of the database where the function is located.
date_value
A date or timestamp argument.
fmt

A character expression.

If this syntax element is NULL, NULL is returned.

If fmt is omitted, date_value is truncated to the nearest day. Sunday is considered the first day of the week. For ISO years, Monday is considered the first day of the week.

If this syntax element is not valid, an error is returned.