Answers for "date fromat php"

PHP
1

create date from string php

$element = '15-Feb-2009';
$date = DateTime::createFromFormat('j-M-Y', $element);
Posted by: Guest on October-22-2020
0

php date from format

<?php
$date = DateTime::createFromFormat('j-M-Y', '15-Feb-2009');
echo $date->format('Y-m-d');
?>
Posted by: Guest on October-18-2021

Browse Popular Code Answers by Language