Answers for "why when i want to convert integer to datetime the result is convert to strinng in php?"

PHP
14

integer to string php

return strval($integer);
Posted by: Guest on April-06-2020
1

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
Posted by: Guest on April-23-2021

Code answers related to "why when i want to convert integer to datetime the result is convert to strinng in php?"

Browse Popular Code Answers by Language