Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Datetime to string php


<?php
$date = new DateTime('2000-01-01');
echo $date->format('Y-m-d H:i:s');
?>

Comment

time to string in php

<?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
?>
Comment

PREVIOUS NEXT
Code Example
Php :: password hash php 
Php :: how to get only decimal value in php 
Php :: upload pdf file in laravel 
Php :: php remove last 3 letters from string 
Php :: get template directory uri 
Php :: pdo connect 
Php :: php curl example 
Php :: json stringify php decode 
Php :: laravel validate enum field 
Php :: php days remaining 
Php :: wp logs 
Php :: phpoffice create excel and download 
Php :: time in php 
Php :: php add 1 day to current date 
Php :: merge two arrays one as key to another php 
Php :: datetime get month php 
Php :: laravel datatable format date column 
Php :: yyyymmdd to yyyy-mm-dd php 
Php :: php or 
Php :: get current month records in laravel 
Php :: php clone 
Php :: creer un modele laravel 
Php :: how to convert array to string in php 
Php :: install php 5.6 on ubuntu 18.04 
Php :: laravel model update 
Php :: IlluminateDatabaseEloquentCollection to array 
Php :: delete multiple row in laravel 
Php :: storage in laravel 
Php :: use php variable in html attributes 
Php :: laravel map array 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =