【问题标题】:Php how to convert date from 12h to 24h format [duplicate]PHP如何将日期从12h转换为24h格式[重复]
【发布时间】:2016-10-30 12:05:32
【问题描述】:

在该脚本中,我得到的结果是 11/01/2017 12:00:01 所以我想要得到的结果是:11/01/2017 00:00:01

$time1 = strtotime("1/".$value['date_operation']."00:00:01"); 
$newformat1 = date('d/m/Y h:i:s',$time1);
echo $newformat1."this is the day formated";

【问题讨论】:

    标签: php date format


    【解决方案1】:
    $newformat1 = date('d/m/Y H:i:s',$time1);
    

    注意大写的“H”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-12-08
      • 1970-01-01
      • 1970-01-01
      • 2015-04-21
      • 2018-05-05
      • 2013-09-07
      • 1970-01-01
      相关资源
      最近更新 更多