Date to php
$dateTime = new \DateTime();
/**
* You can get the string by using format
*/
$dateTime->format('Y-m-d H:i:s');<?php
$date = '27/06/2020, 04:42:43 PM';
$date = str_replace('/', '-', $date);
echo date('F j, Y, g:i a',strtotime($date));
// output : June 27, 2020, 4:42 pm
?>
Also in PHP:
- create temporary password in php
- curent date and time php
- data validation of $_POST in php
- cache clear in laravel command
- check if string is number or not php
- check if delete query was successful laravel
- error reporting phpp
- does $post work with date php
- !php.net date
- don't show php errors
- check if ajax request php
- codeigniter load form_validation
- concat in where clause laravel query builder
- check if a key has a value array php
- echo now phpmp
- decode base64 image php
- error reporting set 0 in php
- Allowed memory size of 1610612736 bytes exhausted composer
- dte fucntion parameters in php
- current datte phph
- Could not open input file: composer.phar
- add a day to date php
- find current date in php
- Custom Order By in CakePHP