MySQL Forums
Forum List  »  PHP

Re: insert error after updating sql server
Posted by: Barry Galbraith
Date: July 30, 2018 10:43PM

Date functions allow "Date arithmetic", like "this month", "today + 30 days", "difference between 2 dates" etc. But you have to have your dates stored in a field of type DATE for the functions to work.

There are functions to allow a DATE (YYYY-MM-DD) to be displayed in any format, even american MM-DD-YYYY, but they have to be stored as type DATE.
There are functions to take a string representing a date, say, "Tue July 31 2018" and store it correctly in type DATE.

Well worth investigating, and using.

Good luck,

Options: ReplyQuote

Written By
Re: insert error after updating sql server
July 30, 2018 10:43PM

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.