Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
堆栈溢出者,
我可以$raw_date通过简单地使用将变量输出为 20130216 echo $raw_date;,但是我希望能够从同一$raw_date变量输出 16/02 或 16/02/2013。
$raw_date
echo $raw_date;
这可能吗,如果可以,怎么办?
谢谢,杰米
$d = DateTime::createFromFormat('Ymd', $raw_data); echo $d->format('d/m/Y');