79164481

Date: 2024-11-06 22:40:05
Score: 1
Natty:
Report link

Finally UNIX_TIMESTAMP worked and my column of type timestamp(3) can be cast to string

select myts_col,UNIX_TIMESTAMP(CAST(myts_col AS STRING)), CAST(myts_col AS STRING),DATE_FORMAT(myts_col,'yyyy-MM-dd HH:mm:ss') from mytable

mycol_ts    conv_col
2024-11-06 06:34:53.316 1730874893
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Faisal Ahmed Siddiqui