Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Convert String to Date and Date-Time in PHP

phpCopy$oldDate = strtotime('03/08/2020');

$newDate = date('Y-m-d',$time);

echo $newDate;
//output: 2020-03-08
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Convert #String #Date #PHP
ADD COMMENT
Topic
Name
3+3 =