String to Date Conversion Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Guys:

  I am trying to turn a prepared line into a date format, and the string looks something like this: 23 JUL 09  -  THURSDAY, and I am trying to change the string to a mm/dd/yyyy format that looks like 07/23/2009. 

  I tried to use strtotime() but it gave me nothing. 
  Here is the code: 

        list($date,$month,$year,$dash,$day) = split(" ",$line,5);
        echo "<date2>" . strtotime($date . "\s" . $month . "\s" . $year). "</date2>";

  Could anyone on the list please give me a hint on what I might have done wrong here? 

Thanks for your help.

Alice










_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial!
http://www.windowsonecare.com/purchase/trial.aspx?sc_cid=wl_wlmail

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux