17.10 - Example: Truncating Digits in Fractional Seconds - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)
This is an example of truncating digits in fractional seconds according to the requested format of FF[1..9] for milliseconds in the timestamp value:
select to_char(timestamp '2020-09-01 23:45:09.999999','yyyy-mm-dd hh:mi:ss.FF1');
The result is:
to_char(2020-09-01 23:45:09.999999,'yyyy-mm-dd hh:mi:ss.FF1')
-------------------------------------------------------------
2020-09-01 11:45:09.9