liamloveslearning Posted May 19, 2010 Share Posted May 19, 2010 Hi everyone, Im having trouble trying to format my date as dd/mm/yyyy. Its being stored in the db as yyyy-mm-dd and it echos correctly using <?php echo KT_FormatForList($row_rsworksorders1['intraartapproval'], 20); ?> however when I try and reformat the output using <?php print date('d/m/Y', $row_rsworksorders1['intraartapproval']); ?> the date shows as 01/01/1969 Anybody see whats wrong? Link to comment https://forums.phpfreaks.com/topic/202238-date-format-help/ Share on other sites More sharing options...
JAY6390 Posted May 19, 2010 Share Posted May 19, 2010 Try this <?php echo KT_FormatForList(date('d/m/Y',strtotime($row_rsworksorders1['intraartapproval'])), 20); ?> Link to comment https://forums.phpfreaks.com/topic/202238-date-format-help/#findComment-1060442 Share on other sites More sharing options...
phpchamps Posted May 19, 2010 Share Posted May 19, 2010 try print date('d/m/Y', strtotime($row_rsworksorders1['intraartapproval'])); Link to comment https://forums.phpfreaks.com/topic/202238-date-format-help/#findComment-1060444 Share on other sites More sharing options...
liamloveslearning Posted May 19, 2010 Author Share Posted May 19, 2010 Worked guys! been trying to figure that out for ages! thanks a lot! Link to comment https://forums.phpfreaks.com/topic/202238-date-format-help/#findComment-1060456 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.