Teradat Date Functions
Teradat Date Functions
As part of Domain Specific Functions Teradata database 14 has released new DATE functions.
Function
LAST_DAY
NEXT_DAY
NUMTODSINTERVAL
NUMTOYMINTERVAL
TO_DSINTERVAL
Description
Return date of the last day of the month that contains timestamp value
returns first weekday named by day_value that is later than the date
specified by date/timestamp value
convert a numeric value into an INTERVAL DAY(4) TO SECOND(6)
value
Convert a numeric value into an INTERVAL YEAR(4) TO MONTH value
Convert a string value into an INTERVAL DAY(4) TO SECOND(6)
value.
TO_YMINTERVAL
MONTHS_BETWEEN
OADD_MONTHS
TO_DATE
TO_TIMESTAMP
TO_TIMESTAMP_TZ
TRUNC
ROUND
Examples:
SELECT LAST_DAY (DATE);
----------------------LAST_DAY(Date)
2014-06-30
---------------------------------------------------------------------------------------------------TRUNC('2014/06/05','D')
2014-06-01
The date was rounded to the first day of that week.