gnawz Posted July 22, 2009 Share Posted July 22, 2009 Hi guys? Help me on how I can change the format of my date displayed form a MySQL database If for instance I have a variable for my date like echo $dateregistered; ie Default is: YY-MM-DD eg 2009-05-23 How do I make it display like this DD-MM-YY or DD-MM.YYY eg 23-05-2009 0r 23-05-09 Kindly help Link to comment https://forums.phpfreaks.com/topic/166957-phpmysql-date-display-format/ Share on other sites More sharing options...
waynew Posted July 22, 2009 Share Posted July 22, 2009 $new_date_formate = date("d-m-Y",strtotime($row['date_col'])); Link to comment https://forums.phpfreaks.com/topic/166957-phpmysql-date-display-format/#findComment-880248 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.