View Full Version : Add 3 months to current date
Schmoopy
04-17-2009, 01:18 PM
Hey there, I found this while trying to find a way of adding a specified number of months / days to another date: http://www.timeanddate.com/date/dateadd.html
It works very well but does anyone know a way of doing this in PHP? I'm not so great when it comes to dates and I'm sure there's a few functions you can string together to get the same result.
Hope you can help,
Thanks.
boogyman
04-17-2009, 02:07 PM
Hey there, I found this while trying to find a way of adding a specified number of months / days to another date: http://www.timeanddate.com/date/dateadd.html
It works very well but does anyone know a way of doing this in PHP? I'm not so great when it comes to dates and I'm sure there's a few functions you can string together to get the same result.
research strtotime() (http://php.net/strtotime)
Schmoopy
04-17-2009, 02:49 PM
Woah, that's insane! :D I thought this would be very complex, but thank **** for that. What a useful function :)
cherilann
10-31-2011, 04:22 PM
Hey I need to get the same function, is it possible I can get what the function was as I do not see it in the post.
Thank u
fastsol1
10-31-2011, 04:35 PM
What do you mean you don't see the function in the post, it's in the second post - strtotime(). Google it and read the info on the php.net site on how it works.
jscheuer1
10-31-2011, 04:38 PM
http://php.net/strtotime
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.