Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Convert DateTime to String in PHP

phpCopy$theDate    = new DateTime('2020-03-08');
echo $stringDate = $theDate->format('Y-m-d H:i:s');

//output: 2020-03-08 00:00:00
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Convert #DateTime #String #PHP
ADD COMMENT
Topic
Name
3+8 =