php date format
$originalDate = "2017-03-08";
$newDate = date("d/m/Y", strtotime($originalDate));
php date format
$originalDate = "2017-03-08";
$newDate = date("d/m/Y", strtotime($originalDate));
format date in php
$myDateTime = DateTime::createFromFormat('Y-m-d', $dateString);
$newDateString = $myDateTime->format('d-m-Y');
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us