Answers for "how to convert date in fjd formate in php"

PHP
0

php changr date format

$originalDate = "2010-03-21";
$newDate = date("d-m-Y", strtotime($originalDate));
Posted by: Guest on February-27-2020
2

format a date sting php

# From a date Object:
date_format ( DateTimeInterface $object , string $format )

# From the current time
$dateTime = new \DateTime(); 
// or pass a string or int ->`DateTime($date_time)`
$dateTime->format('y-j-d H:i:s T'); #print ex: 21-2-02 16:00:01 PST

# Or a quick one-liner:
date('g:i A m-d-Y', strtotime($date_time)); #print ex: 2:00 PM 02-02-2021
Posted by: Guest on January-15-2021

Code answers related to "how to convert date in fjd formate in php"

Browse Popular Code Answers by Language