MySQL Forums
Forum List  »  Newbie

Re: Converting DATE to INT
Posted by: Phillip Ward
Date: January 19, 2015 06:07AM

Quote

I would like to convert the date 2011-04-20 to the integer 20110420
Why??

If you've got data in a proper Date field, then leave it there!

If you don't, you will waste vast of time - both yours and your database server's - changing data back and forth into proper Dates so that you can do "date" things with it. [All] The data manipulation functions that MySQL provides only work on Date[/s] values.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
January 18, 2015 02:33AM
Re: Converting DATE to INT
January 19, 2015 06:07AM
January 19, 2015 12:26PM
January 19, 2015 10:56AM


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.