priyadharshini Posted October 20, 2010 Share Posted October 20, 2010 I want the current date to be displayed in this format: year-month-day hr:min:sec Suggest me some functions or codings Quote Link to comment https://forums.phpfreaks.com/topic/216337-date-time/ Share on other sites More sharing options...
carpiediem Posted October 20, 2010 Share Posted October 20, 2010 http://www.php.net/manual/en/datetime.format.php $date = new DateTime('2000-01-01'); echo $date->format('Y-m-d H:i:s'); Quote Link to comment https://forums.phpfreaks.com/topic/216337-date-time/#findComment-1124259 Share on other sites More sharing options...
priyadharshini Posted October 20, 2010 Author Share Posted October 20, 2010 I got it now thanks Quote Link to comment https://forums.phpfreaks.com/topic/216337-date-time/#findComment-1124271 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.