Redshift Timestamp Trailing Zeros

0

Enter image description here Can anybody knows why the zeros at timestamp (eg. 2022-11-08 07:50:08.100 to 2022-11-08 07:50:08.10) are truncated by Redshift automatically? Please refer to my screenshot for details.

Ren
feita há um ano579 visualizações
1 Resposta
0

The timestamp is stored in Redshift typically would not loose the precision. Depending the tool you use to display the results of the SQL data, the formatting may be showing 2 decimal places as default unless you have more than 2 non zero decimal places.

Try this to display 3 or 6 digits:

select id,created_dt,
to_char(created_dt, 'HH24:MI:SS') as seconds,
to_char(created_dt, 'HH24:MI:SS.MS') as milliseconds,
to_char(created_dt, 'HH24:MI:SS:US') as microseconds;
profile pictureAWS
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas