Search
 
SCRIPT & CODE EXAMPLE
 

PHP

adding n days to a DATETIME format value

$n = 10;	// add 10 days for existing date
$datetime = new DateTime('2013-01-29');
$datetime->modify('+'.$n.' day');

echo $datetime->format('Y-m-d H:i:s');	// 2013-02-08 00:00:00
Comment

PREVIOUS NEXT
Code Example
Php :: php echo to stderr 
Php :: laravel title dynamic 
Php :: php retrieve data from database and show in text area greeper 
Php :: laravel retry failed transactions 
Php :: oneliner if php 
Php :: get average of sql column php 
Php :: laravel mix build as umd 
Php :: wp_query not have term 
Php :: warning: parameter 2 to search_by_title() expected to be a reference, value given in 
Php :: wprest api remove content from response 
Php :: php ord deprecated 
Php :: recuperar dados de um objeto em outra página herança php 
Php :: get pages with tempalte wp 
Php :: Laravel - Controller get select value from Views 
Php :: codeigniter database metadata 
Php :: laravel sintax 
Php :: use scope in statamic template 
Php :: mobibeDetect 
Php :: checking why sql query not connecting to database 
Php :: php decrement variable 
Php :: add reviews from code site reviews wp 
Php :: Undefined array key after unset() 
Php :: Replace default WP search and dropdown placeholder 
Php :: Get page title, excerpt or content by id 
Php :: get_html_translation_table (PHP 4, PHP 5, PHP 7, PHP 8) get_html_translation_table — Returns the translation table 
Php :: Multiple databases user validation in Laravel 
Php :: single elimination php code 
Php :: after i migrate wordpress website to new domain I cant login to wordpress admin 
Php :: how to get many of quensation php programming language 
Php :: query for current editing post id 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =