Hassam
Hassam

Reputation: 103

How to cast a string/varchar 20240627181610100000 to timestamp(3/6) in Teradata?

Can you help me understand how the timestamp formats works with miliseconds in Teradata?

for-example this works fine Value: 20240627181751 Format: YYYYMMDDHHMISS

SELECT CAST( '20240627181751' AS TIMESTAMP(0) FORMAT 'YYYYMMDDHHMISS')

but as soon I have miliseconds '20240627181751000' it starts failing tried different format like 'YYYYMMDDHHMISS.S(3)', I don't want to use sub-string functions.

Upvotes: 0

Views: 41

Answers (0)

Related Questions