I receive a datetime from a plugin. I put it into a variable:
$datetime = \"20130409163705\";
That actually translates to yyyymm
yyyymm
You could do it like this:
You can look at date_parse_from_format() and the accepted format values.