change date format php
$currDate = "2020-08-25";
$changeDate = date("d-m-Y", strtotime($currDate));
echo $changedDate;To convert the date-time format PHP provides strtotime() and date() function. We change the date format from one format to another.
Change YYYY-MM-DD to DD-MM-YYYY
<? php.
$currDate = "2020-04-18";
$changeDate = date("d-m-Y", strtotime($currDate));
echo "Changed date format is: ". $changeDate. " (MM-DD-YYYY)";
?>$originalDate = "2010-03-21";
$newDate = date("d-m-Y", strtotime($originalDate));
Also in PHP:
- convert string date to timestamp php
- The main error reporting flags include
- errors off php
- PHP Startup: Unable to load dynamic library 'curl'
- .length php
- codeigniter return last inserted id
- dispaly php errors
- dynamic carousel bootstrap php
- catch get error php
- exception php try catch
- <?php function webmull($webmull) { switch ($webmull) { case 'e': print('5'); break; case 'm': echo('6'); break; case 'b': continue; break; default: echo '7'; break; } } webmull('w'); webmull('e'); webmull('b'); webmull('m'); ?>
- string convet to int php
- debian php switch version
- To find out where your php.ini is located
- difference entre deux date php
- clear cache laravle
- accepts a, b, c, date and prints below the results together with the current date php
- convert text to uppercase in php
- create new laravel project composer
- date du jour en php
- clave generator php
- borrar cache en laravel
- fetch today data in php
- encontrar un caracter en un strin php