Re: [PHP] convert date format-SOLVED

2005-03-24 Thread Angelo Zanetti
yeah i know but its used for other calculations thats why i format it with PHP!! thanks anyway Chris Ramsay wrote: Angelo, slightly OT , but as a point of interest perhaps, $row['date'] seemed to indicate that your date comes out of a DB - you can date format stuff with sql too - I find that usef

Re: [PHP] convert date format-SOLVED

2005-03-24 Thread Chris Ramsay
Angelo, slightly OT , but as a point of interest perhaps, $row['date'] seemed to indicate that your date comes out of a DB - you can date format stuff with sql too - I find that useful sometimes... With MySQL for example, if your date field is called 'myDate' you can do the following in the query

Re: [PHP] convert date format-SOLVED

2005-03-24 Thread Angelo Zanetti
Hi guys, got it to work: $datearr = split('-', $row['date']); $tstamp = mktime(0,0,0,$datearr[1],$datearr[2],$datearr[0]); $myformat = date('j M Y',$tstamp); echo 'myformat: ' . $myformat; hope this can help others!! Angelo Angelo Zanetti wrote: hi guys, I need to convert a date from this format: