MySQL Forums
Forum List  »  Oracle

CURDATE()-1 on the 1st returns date of 00
Posted by: Anthony Stump
Date: October 02, 2014 04:23PM

I don't know if this is a bug or why it happens, but whenever I run CURDATE()-1 on the 1st of the month, it sets the date to the 0th.

i.e. if I do a CURDATE()-1 on October 1st, it will output 2014-10-00 as the date.

Why does it do this?

Options: ReplyQuote


Subject
Views
Written By
Posted
CURDATE()-1 on the 1st returns date of 00
2995
October 02, 2014 04:23PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.