1

how do i add datetime ( not current timestamp) but any date and time in 'datetime' field of mysql database in the format 2011-03-18 18:37:06 from php ? does jquery calendar allow time as well or what is the easy way to do so ? any help would be greatly appreceated. Thanks

2 Answers 2

3

86400 seconds in a day, times number of days.. and add it to current time.

$nextWeek = time()+86400*7; echo date("Y-m-d H:i:s", $nextWeek); 
Sign up to request clarification or add additional context in comments.

Comments

1

<?php echo date("Y-m-d H:i:s"); ?>

not sure how this is CI related.

2 Comments

"( not current timestamp) but any date and time..."
yes not current timestamp for example i want to add date and time for 1 week later or after 25 days later

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.