RE: [PHP] String to Date Conversion Problem

2009-07-31 Thread Alice Wei
Looks like what I did by using mm/dd/ was extra, which was probably why it didn't work. Thanks, looks like this is up and running now. Alice > CC: php-general@lists.php.net > From: stu...@stuconnolly.com > To: aj...@alumni.iu.edu > Subject: Re: [PHP] String to Date C

Re: [PHP] String to Date Conversion Problem

2009-07-31 Thread Stuart Connolly
Hi Alice, Based on the string format that you mentioned (DD MMM YY - DAY) you should be able to transform to any other date using the following: $parts = explode(' ', '23 JUL 09 - THURSDAY'); echo date('m/d/Y', strtotime("{$parts[1]} {$parts[0]} {$parts[2]}")); Cheers Stuart On 31 Jul 200