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.
我有现有的日期2000-06-22,我想将其转换为06/22/2000格式任何 PHP 技术都可以工作。我在magento中工作。如何 ?任何解决方案?提前致谢。!!
2000-06-22
06/22/2000
试试这个 :
$dt_str = '2000-06-22'; $date = new Datetime($dt_str); echo $date->format('m/d/Y');
echo date('m/j/Y', strtotime('2000-06-22'));