aman gupta
aman gupta

Reputation: 9

Date Extraction

I do want to extract date only from the date column. Actually it is showing as below:-

11/24/2020 00:00:00

I want only 11/24/2020 in redshift database.

Please help..

Upvotes: 0

Views: 31

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1269633

Assuming the column is a date/time of some sort, you can cast it:

select col::date

If it is a string, you can use string operations:

select left(col, 10)

Upvotes: 1

Related Questions