Vidya_tr Posted April 22, 2009 Share Posted April 22, 2009 Is there a 'date' datatype in php where there is only the date and not the time along with it I want it to be '2008-08-03 ' (that is, only the date) and not '2008-08-03 14:52:10' Quote Link to comment https://forums.phpfreaks.com/topic/155173-solved-date-datatype/ Share on other sites More sharing options...
Yesideez Posted April 22, 2009 Share Posted April 22, 2009 No, just control what you want output. Let's say you're pulling a DATETIME value from the database and it is now stored in $dt echo date('d-m-Y',strtotime($dt)); That will output in the format dd-Mmm-YYYY http://uk.php.net/date Quote Link to comment https://forums.phpfreaks.com/topic/155173-solved-date-datatype/#findComment-816283 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.