TD_TIME_BUCKET_NUMBER Example | Teradata Vantage - 17.00 - Example: Use TD_TIME_BUCKET_NUMBER to Calculate a Time Bucket Number - Teradata Database

Teradata Vantageā„¢ - Time Series Tables and Operations

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-1208-170K
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