In PHP how do a translate a date to numerical format not knowing the format of the string beforehand
Posted
by stormist
on Stack Overflow
See other posts from Stack Overflow
or by stormist
Published on 2010-05-12T17:24:23Z
Indexed on
2010/05/12
17:34 UTC
Read the original article
Hit count: 136
Examples of the translations I need to do:
$stringDate = "November 2009"; $output = "11/09";
$stringDate = "October 1 2010"; $output = "10/01/2010";
$stringDate = "January 2010"; $output = "01/10";
$stringDate = "January 9 2010"; $output = "01/09/2010";
Note that I do not know which format the $stringDate will be in and the lack of commas in the month day year set.
Thanks for any help anyone might offer.
© Stack Overflow or respective owner