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 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'); 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 Link to comment https://forums.phpfreaks.com/topic/216337-date-time/#findComment-1124271 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.