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

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

\n\n

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

\n\n

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

\n\n

Solution:

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

nVector

posted on

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds