26 August 2018        Add to Favorites   Report

How to remove milliseconds from timestamp(6) / datetime in Teradata

Scenario : We are selecting from a table with a timestamp(6) data type.

Currently the data look like this: 03/10/2014 21:54:47.690000

Expected: 03/10/2014 21:54:47


SELECT  current_timestamp(6) AS ts,
ts (FORMAT 'MM/DD/YYYYbhh:mi:ss') (CHAR(19))

Read great educational content like this and a lot more ! Create my free account now 🎁