Date_Trunc and CastToDate #413

Closed
Ghalleb opened this Issue May 9, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@Ghalleb

Ghalleb commented May 9, 2013

It would be usefull to have the Date_Trunc(date_part, timestamp) and Date(timestamp) functions.

date_trunc('day', '2011-10-19 13:00:00') returns 2011-10-19 00:00:00
date('2011-10-19 13:00:00') returns 2011-10-19

Here is the documentation for date_trunc:
http://www.postgresql.org/docs/9.1/static/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC

the date(timestamp) function just return a date type of the timestamp value.

timowest added a commit that referenced this issue May 9, 2013

timowest added a commit that referenced this issue May 9, 2013

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest May 9, 2013

Member

For now date_trunc is available for PostgreSQL and Oracle

Member

timowest commented May 9, 2013

For now date_trunc is available for PostgreSQL and Oracle

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest May 27, 2013

Member

Released in 3.2.0

Member

timowest commented May 27, 2013

Released in 3.2.0

@timowest timowest closed this May 27, 2013

@timowest timowest added this to the 3.2.0 milestone Apr 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment