$mon = "Jun";
$datestamp = strtotime("10 " . $mon . "2001");
$monthpart = date("m", $datestamp);
echo $monthpart;
Try this:
$mon = "Jun";
$monthpart = date("m", strtotime("10 " . $mon . "2001"));
Jim wrote:
Thanks Dale! That will definitely do the trick. I was hoping for a one-step function for converting three letter string months to thier ordinal values (1-12). Looks like a good candidate for a UDF - I need the practice anyway! Thanks again for responding.