Convert String To date in PHP

后端 未结 9 2047
清酒与你
清酒与你 2020-12-15 08:54

How can I convert this string 05/Feb/2010:14:00:01 to unixtime ?

9条回答
  •  盖世英雄少女心
    2020-12-15 09:21

    Use the strtotime function:

    Example:

     $date = "25 december 2009";
     $my_date = date('m/d/y', strtotime($date));
     echo $my_date;
    

提交回复
热议问题