Converting string to Date and DateTime in PHP

Converting string to Date and DateTime in PHP



At first we use

$time = strtotime('10/16/2022');
$customformat = date('Y-m-d',$time);

echo $customformat;
// 2022-10-16


Converting string to Date and DateTime in PHP Converting string to Date and DateTime in PHP Reviewed by Md Shahinur Islam on November 29, 2022 Rating: 5

No comments:

Powered by Blogger.