Reputation: 44228
This is an excerpt from my sql query
SELECT
date_trunc(
'day',
to_timestamp(requests.date_created)
)AS DAY,
this is my output
2013-02-04 00:00:00+00
I want this to be just
2013-02-04
how do I get the desired result?
Upvotes: 11
Views: 13286
Reputation: 291
You can use to_date to specify your date format
TO_DATE(date_col, 'yyyy-mm-dd')
Upvotes: 5