gpt4 book ai didi

php - 如何在 Php 中将日期从一种格式转换为另一种格式

转载 作者:行者123 更新时间:2023-12-01 00:30:30 25 4
gpt4 key购买 nike

如何在 Php 中将日期从“2011-08-01 04:01:45”转换为“Mon, 01 Aug 2011 05:37:45 -0400”

非常感谢...

最佳答案

$newDate = date('r', strtotime('2011-08-01 04:01:45'));

关于php - 如何在 Php 中将日期从一种格式转换为另一种格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6963848/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com