471,090 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,090 software developers and data experts.

date

Hi,

I retrieve a date from the mysql database.

e.g 2004/12/02

How is it possible to make this day with 1 day higher : so I get 2004/12/03?

Thx,

Alain
Jul 17 '05 #1
2 1353
Hi Alain,
How is it possible to make this day with 1 day higher : so I get
2004/12/03?

Try this:
SELECT DATE_ADD(date_column_name, INTERVAL 1 DAY) FROM table_name
Have a great day!
Ben :-)
Ben Gribaudo - Baltimore, MD - www.bengribaudo.com

"For God so loved the world, that he gave his only begotten Son, that
whosoever believeth in him should not perish, but have everlasting life."
John 3:16

"Alain Dhaene" <al**********@worldonline.be> wrote... Hi,

I retrieve a date from the mysql database.

e.g 2004/12/02

How is it possible to make this day with 1 day higher : so I get 2004/12/03?
Thx,

Alain

Jul 17 '05 #2
Alain Dhaene wrote:
I retrieve a date from the mysql database.

e.g 2004/12/02

How is it possible to make this day with 1 day higher : so I get 2004/12/03?


If the dates are in datetime format you can manipulate them in all sorts
of ways. PHP is pretty flexible in date interpretation too. e.g

$today="2004/12/02";

$tomorrow = date("Y:m:d",strtotime("+1 day",strtotime($today)));

Hope that helps,

Kelv
--
LoHost
http://www.lohost.com
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by androtech | last post: by
4 posts views Thread by Richard Hollenbeck | last post: by
2 posts views Thread by Tjerk | last post: by
9 posts views Thread by Thomas R. Hummel | last post: by
30 posts views Thread by Dr John Stockton | last post: by
1 post views Thread by Liz Malcolm | last post: by
12 posts views Thread by Assimalyst | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.