Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date_Trunc and CastToDate #413

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

Date_Trunc and CastToDate #413

Ghalleb opened this issue May 9, 2013 · 2 comments
Milestone

Comments

@Ghalleb
Copy link

@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
Copy link
Member

@timowest timowest commented May 9, 2013

For now date_trunc is available for PostgreSQL and Oracle

@timowest
Copy link
Member

@timowest 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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants