![]() |
|
#1
|
|||
|
|||
How to add months to dateWhat is the best way to add $months (1, 3, or 6) to $date (yyyy-mm-dd) to get $duedate in the yyyy-mm-dd format?
|
|
#2
|
||||
|
||||
|
Better solution can be found here: PHP - date adding Years, Months, Days, Minutes.
Hello hellcat1, You ask a very interesting question... one I asked myself many moons ago! The example in that thread was good only for a while and obviously what I use right now is totally re-written (and not so specific). If you hang on for a just an hour or so, I'll be done with my usual, daily online tasks and post the function that may help you do what you want to do into the PHP Code Library. I'll reply here once it's done... __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ Last edited by admin : 29-Jan-2007 at 09:07.
Reason: Updated information
|
|
#3
|
||||
|
||||
|
I still have much to add to the thread, but here is the function that allows you to easily calculate a due date in your PHP scripts: Calculate Due Dates. Your comments, suggestions and bug reporting is appreciated.
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#4
|
|||
|
|||
|
Quote:
Ah, excellent. Charms like a work |
Recent GIDBlog
Toyota - 2008 July Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Web Revenue report card - First 6 months of 2004 | Div | Advertising & Affiliates Forum | 4 | 29-Jul-2004 22:22 |
| Rookie problem with date format | cave monkey | MySQL / PHP Forum | 4 | 18-Mar-2004 08:41 |
| Get up to 3 months of FREE web hosting ! | goody | Web Hosting Advertisements & Offers | 0 | 17-Nov-2003 03:50 |
| Get up to 3 months of free web hosting | goody | Web Hosting Advertisements & Offers | 0 | 07-Jun-2003 07:44 |
| Date for in an e-mail | Allowee | MySQL / PHP Forum | 4 | 17-May-2003 09:05 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The