| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Ciprian Constantinescu | Date: | November 30 2005 11:43am |
| Subject: | Re: Date increment | ||
| View as plain text | |||
SELECT DATE_ADD(expiredate, INTERVAL 17 DAYS) http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html ""Peter Lauri"" <peter@stripped> wrote in message news:4i32cf$o094s@ style="color:#666">stripped... Best group member, I have a field called expiredate of type 'date'. I would like to add 17 days to the expiredate without doing any scripting, is that possible? Example: Expiredate is 2005-11-30 and I want to extend the expiredate with 17 days. Is there any function in MySQL that adds days to a date? A solution for this would be to write a PHP script that takes the date and adds 17 days to it (checking month overlap and stuff), but I want to skip scripting if there is an solution within MySQL that does it for me. /Peter
| Thread | ||
|---|---|---|
| • Date increment | Peter Lauri | 30 Nov |
| • Re: Date increment | Ciprian Constantinescu | 30 Nov |
| • Re: Date increment | Cal Evans | 30 Nov |
| • Re: Date increment | Peter Brawley | 30 Nov |
| • Re: Date increment | Jyrki Laurila | 30 Nov |
