Hi friends ..
well there is a date coming form my database now i want the date after the 6 months of the date coming from my database
can any body help me for this , there is any function which gives us the date by adding 6 months in the date coming from the database
for ex. if my date is 25/11/2007 than i need the date after the 6 month of 25/11/2007
please help me for this ..
thanks.
djdon11
want to add 6 months in the date coming from database
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Code: Select all
SELECT DATE_ADD(`your_date_field`, INTERVAL 6 MONTH)-
worldofcarp
- Forum Newbie
- Posts: 2
- Joined: Tue Nov 20, 2007 1:18 pm
If you want to do it in php do it like this:
You have to change the date format a little to that format to work, strtotime is a little finicky sometimes
Code: Select all
strtotime('2007-11-25 +6 months');