MySQL Forums
Forum List  »  Newbie

Re: convert datetime to date
Posted by: Ramalingam Chelliah
Date: August 27, 2004 01:09AM

If you need to extract date from date-time field just use
LEFT() function ...

mysql> SELECT LEFT('2004-08-27 12:38:54',10) ;

This will return '2004-08-27'

Hope this helps ,

Still having problem ?


We Learn the Most When we have to Invent

Options: ReplyQuote

Written By
August 24, 2004 10:29AM
Re: convert datetime to date
August 27, 2004 01:09AM

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.