I receive a datetime from a plugin. I put it into a variable:
$datetime = \"20130409163705\";
That actually translates to yyyymm
yyyymm
You can use date_parse_from_format() function ...
date_parse_from_format()
Check this link..you will get clear idea