Hi,
I'd like to be able to minus 3 months from a date and then round it down to 1st of that month.
Example:
(format british time d/m/y)
today = "14/1/2009";
three months ago = "1/10/2008"
Can anyone tell me how I can do this using php?
Thanks
--Mark
date minus 3 months
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: date minus 3 months
Check out example 3 on...
http://uk3.php.net/date
http://uk3.php.net/date
Re: date minus 3 months
strtotime() I think is better suited for adding or removing time.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: date minus 3 months
thanks jaoudestudios , that did it.