Are you even reading the manual before posting questions?
http://www.mysql.com/doc/en/Date_and_time_functions.html

SELECT NOW() + INTERVAL 14 DAY AS exp_date;

Gurhan

On Fri, 2002-09-06 at 21:40, Clemson Chan wrote:
> hi guys,
> 
> I have a column expire_date DATETIME.
> How do I add 2 weeks to "now()" and put it in the database?
> 
> MySQL> update table_name set expire_date = now()+1209600 where id = 1;
> 
> I know "now()+30" is now plus 30 seconds.
> 2 weeks = 60x60x24x14 = 1209600 seconds.
> 
> But when do the above command, the value become 0000-00-00 00:00:00.
> And get 1 warning in the warning count. No warning displayed.
> 
> Someone, please help. Thanks.
> 
> --Clemson
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to