Aseem
Aseem

Reputation: 6769

How to convert Athena timestamp to string

I am using following code:

select date_col::TEXT from table1;

Error:

identifiers must not contain ':' (service: amazonathena; status code: 400; error code: invalidrequestexception; request id: 0445a8ab-7bbc-4db2-bb6d-4d8b48bebd1f; proxy: null)

Upvotes: 4

Views: 11835

Answers (1)

Robert Kossendey
Robert Kossendey

Reputation: 6998

Can you try select cast(date_col as varchar) from table1;

Upvotes: 7

Related Questions