Answers for "php convert current date to string"

PHP
0

date to string in php

Date to string

$date = "2021/03/13";
$newdate= date('d M, Y', strtotime($date));
echo $newdate;
Posted by: Guest on March-13-2021
0

Convert DateTime to String in PHP

phpCopy$dateFormat = new DateTime(); // this will return current date
echo $stringDate = $date->format(DATE_ATOM);

//output: 2020-03-08T12:54:56+01:00
Posted by: Guest on April-23-2021

Code answers related to "php convert current date to string"

Browse Popular Code Answers by Language