Advancing a date()
Posted: Sat Aug 30, 2003 2:53 pm
Hi,
I have had a look around for an answer to this, and maybe I am searching for the wrong thing because I cannot find anything!
I have a date in a mysql database that is in the format 2003-01-29. This is then formatted on the actual page to 29 Jan 2003. I am wondering whether it is possible to easily add thirty days to any date, so that a date in the future is shown exactly thirty days ahead. I expect it should know about the number of days in the month and compensate for this.
Is there an easy was of doing this or would I be better to work it out each time myself?
Thanks a lot,
Lawrence
I have had a look around for an answer to this, and maybe I am searching for the wrong thing because I cannot find anything!
I have a date in a mysql database that is in the format 2003-01-29. This is then formatted on the actual page to 29 Jan 2003. I am wondering whether it is possible to easily add thirty days to any date, so that a date in the future is shown exactly thirty days ahead. I expect it should know about the number of days in the month and compensate for this.
Is there an easy was of doing this or would I be better to work it out each time myself?
Thanks a lot,
Lawrence