GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 29-Jul-2004, 22:12
hellcat1 hellcat1 is offline
Awaiting Email Confirmation
 
Join Date: Jul 2004
Location: Spring, TX
Posts: 7
hellcat1 is on a distinguished road
Question

How to add months to date


What 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  
Old 30-Jul-2004, 06:03
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
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...
Last edited by admin : 29-Jan-2007 at 10:07. Reason: Updated information
  #3  
Old 30-Jul-2004, 06:52
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
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.
  #4  
Old 30-Jul-2004, 07:45
hellcat1 hellcat1 is offline
Awaiting Email Confirmation
 
Join Date: Jul 2004
Location: Spring, TX
Posts: 7
hellcat1 is on a distinguished road
Talking

Quote:
Originally Posted by JdS
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.

Ah, excellent. Charms like a work
 
 

Recent GIDBlogAccepted for Ph.D. program by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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 23:22
Rookie problem with date format cave monkey MySQL / PHP Forum 4 18-Mar-2004 09:41
Get up to 3 months of FREE web hosting ! goody Web Hosting Advertisements & Offers 0 17-Nov-2003 04:50
Get up to 3 months of free web hosting goody Web Hosting Advertisements & Offers 0 07-Jun-2003 08:44
Date for in an e-mail Allowee MySQL / PHP Forum 4 17-May-2003 10:05

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:06.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.