Forums
This topic is locked
SQL Help now()+1year
Posted 18 years ago
1
has voted
18 years ago 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 18 years ago
18 years ago Roddy Dairion replied:
date_add(now(), interval 1 year )
Hope this does the trick.
Hope this does the trick.