Forums
This topic is locked
SQL Help now()+1year
Posted 30 Jan 2007 03:36:56
1
has voted
30 Jan 2007 03:36:56 Peter Galbraith posted:
I need to enter a date into my mySQL database that is right now + 1 year. Does anyone know the syntax of offsetting a date? I know that you can use the now() function but I don't know how to add the year to it. I would prefer to do it with the SQL rather than PHP, but I could do that too.Thanks.
________________
<i>"You cannot escape the responsibility of tomorrow by evading it today." </i> Abraham Lincoln
Company – www.iriselements.com - Projects (www.imagetrail.net – www.microstockforum.com)
Replies
Replied 30 Jan 2007 11:00:45
30 Jan 2007 11:00:45 Roddy Dairion replied:
date_add(now(), interval 1 year )
Hope this does the trick.
Hope this does the trick.