add 1 day to date php
<?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;
?>$date = new DateTime('2000-01-01');
$date->add(new DateInterval('P1D'));<?php
// adding extra days to date
// Steps:
// 1) using carbon
// 2) using strtotime
//Step 1
$date = date('Y M d h:i:s') // 2020 09 22 22:09:26 UTC
$new_date = Carbon::parse($date->addDays(1); // adds extra day
// Step 2
$date = date('Y M d h:i:s') // 2020 09 22 22:09:26 UTC
echo $new_date = date('Y M d h:i:s', strtotime($date. '+1 day'));
?>
Also in PHP:
- create seed in laravel
- do console log in php code
- AWS HTTP error: SSL operation failed with code 1.
- command to create seed file in laravel
- ata date format in php
- Use Laravel for server
- check string for value php
- cache get laravel
- codeigniter id of last insert
- check if array key is empty php
- _______ is used to execute laravel project
- $s->$h php code
- body field yml drupal config
- delete in wordpress query
- fetch data based on month and year in laravel
- Artisan call Cache:clear force
- check array for duplicate values php
- add object in array php
- $_Service php find
- Illuminate\Contracts\Container\BindingResolutionException Target class [SlugController] does not exist.
- client_ip() function php
- -5 php change timezone
- PHP Warning
- check to see in string contains a specifc word php