how to re-format datetime string in php?

后端 未结 8 994
栀梦
栀梦 2020-11-29 07:00

I receive a datetime from a plugin. I put it into a variable:

$datetime = \"20130409163705\"; 

That actually translates to yyyymm

8条回答
  •  孤街浪徒
    2020-11-29 07:49

    You can use date_parse_from_format() function ...

    Check this link..you will get clear idea

提交回复
热议问题