Answers for "1970:01:01 when convert datetime to date in php"

PHP
0

convert date in php

$originalDate = "2010-03-21";
$newDate = date("d-m-Y", strtotime($originalDate));
Posted by: Guest on February-27-2020
0

Convert String to Date and Date-Time in PHP

phpCopyecho $dateNew = DateTime::createFromFormat('m-d-Y', '03-08-2020')->format('Y/m/d');
//output: 2020/03/08
Posted by: Guest on April-23-2021

Browse Popular Code Answers by Language