Php get how many days and hours left from a date

前端 未结 6 1412
一生所求
一生所求 2020-12-03 11:47

I have a created_at date saved liked this \"2011-09-23 19:10:18\" And I want to get the days and hours left until the date is reached. How do I do that? and column name in

6条回答
  •  余生分开走
    2020-12-03 12:13

    it would be something like

    echo $date = date("Y-m-d H:i:s");echo "\n";
    
    $original=time($date);
    
    
    $modified = "2011-09-23 19:10:18";
    
    echo date("Y-m-d H:i:s",$modified);echo "\n";
    

提交回复
热议问题