TD_TIME_BUCKET_NUMBER Example | Teradata Vantage - 17.10 - Example: Use TD_TIME_BUCKET_NUMBER to Calculate a Time Bucket Number - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Time Series Tables and Operations

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1208-171K
Language
English (United States)
SELECT
TD_TIMECODE,
TD_TIME_BUCKET_NUMBER(DATE '1900-01-01', TD_TIMECODE, CAL_YEARS(10)) FROM
ts_group_by_time_tb
WHERE id = 0
ORDER BY 2;
                                                       
TD_TIMECODE                    TD_TIME_BUCKET_NUMBER(1900-01-01,TD_TIMECODE,CAL_YEARS(10))                  
2006-06-06 06:06:06.006002    11