Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get date after 1 dayphp

<?php
$stop_date = '2009-09-30 20:24:00';
echo 'date before day adding: ' . $stop_date; 
$stop_date = date('Y-m-d H:i:s', strtotime($stop_date . ' +1 day'));
echo 'date after adding 1 day: ' . $stop_date;
?>

For PHP 5.2.0+, you may also do as follows:
<?php
$stop_date = new DateTime('2009-09-30 20:24:00');
echo 'date before day adding: ' . $stop_date->format('Y-m-d H:i:s'); 
$stop_date->modify('+1 day');
echo 'date after adding 1 day: ' . $stop_date->format('Y-m-d H:i:s');
?>
Comment

PREVIOUS NEXT
Code Example
Php :: php if short form 
Php :: replace string in php 
Php :: laravel update email unique 
Php :: check the request type in laravel 
Php :: php json_decode not working 
Php :: how to call php function from ajax 
Php :: toggle between login and logout buttons php 
Php :: @lang laravel blade 
Php :: Round the number in php 
Php :: laravel get data in pivot table 
Php :: wordpress autosave 
Php :: start php file 
Php :: laravel trans with parameters 
Php :: validation laravel 
Php :: How to create a route in laravel? 
Php :: laravel e commerce full project 
Php :: javascript function in php json_encode 
Php :: showing custom post type in wordpress website 
Php :: create model, controller and migration in single command laravel 
Php :: EntityManager get repository 
Php :: php random filename generator 
Php :: laravel store file 
Php :: php image rotate upload 
Php :: get admin url wordpress 
Php :: laravel 6 make http request 
Php :: php convert latitude longitude to map tile 
Php :: php url exists valid 
Php :: what is array_map in php 
Php :: php get first element of iterator class 
Php :: if is page woocommerce 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =