Format a date
Posted 03 October 2006 - 11:00 AM
The format the information is currently in is, 2005-11-07 00:00:00.
I need to display this date as 07/11/2005 (D M Y)
I have looked at the strftime function and it doesnt appear to work, I just keep getting a different combination of 01/01/1970.
How can I change this so that it displays correctly?
Posted 03 October 2006 - 11:02 AM
<?php $date_str = '2005-11-07 00:00:00'; echo date('d/m/Y',strtotime($date_str)); ?>
Posted 03 October 2006 - 11:11 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users