Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php change date format from d/m/y to y-m-d

$var = '20/04/2012';
$date = str_replace('/', '-', $var);
echo date('Y-m-d', strtotime($date));
Comment

change datetime format from Y-m-d h:i:s to d-m-Y in php

$old_date = date('l, F d y h:i:s');              // returns Saturday, January 30 10 02:06:34
$old_date_timestamp = strtotime($old_date);
$new_date = date('Y-m-d H:i:s', $old_date_timestamp);   
Comment

PREVIOUS NEXT
Code Example
Php :: laravel image ratio validation 
Php :: html php pass data to another page 
Php :: laravel migration index 
Php :: connect to sql database 
Php :: select values from mysql using php array of ids 
Php :: laravel subtract date 
Php :: laravel use session values in view 
Php :: how to display image in wordpress 
Php :: round up built in function php 
Php :: laravel update by id 
Php :: larvel make http request 
Php :: php remove duplicates from multidimensional array 
Php :: php required 
Php :: create a text file in laravel 
Php :: Notice: Trying to access array offset on value of type int in /var/www/pdam/modules/phpexcel/PHPExcel/Cell/DefaultValueBinder.php on line 82 
Php :: json to array php 
Php :: how to define function in php 
Php :: php server sent events 
Php :: php return json data 
Php :: laravel delete 
Php :: remove item from collection 
Php :: crul in laravel 
Php :: search function using php for database entries 
Php :: create new laravel 9 project 
Php :: php catch all exceptions 
Php :: unlink is a directory laravel 
Php :: convert single quote in htmlentities php 
Php :: laravel slug 
Php :: How to JSON encode a PHP array 
Php :: Create a laravel project with any version 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =