Convert to date format dd/mm/yyyy

前端 未结 6 927
感动是毒
感动是毒 2020-12-01 06:29

I have the following date: 2010-04-19 18:31:27. I would like to convert this date to the dd/mm/yyyy format.

6条回答
  •  独厮守ぢ
    2020-12-01 06:44

    You can use a regular expression or some manual string fiddling, but I think I prefer:

    date("d/m/Y", strtotime($str));
    

提交回复
热议问题