Re: add secs to datetime

2002-01-07 Thread Kodrik

On Monday 07 January 2002 01:13 am, Roger Baklund wrote:
> * Kodrik
>
> > I have datetime and I want to add a number or seconds to it. That
> > number can be greater than 60, it can actually be greater than the
> > equivalent of a years in seconds.
> >
> > How do I add these seconds to the value of a datetime field
> > through an update with MySQL?
>
> update table set datefield=datefield + INTERVAL 1 SECOND;

I thought SECOND was limited to 59 and if you entered more it ignored it. 
Glad to see I was wrong :)

-
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




RE: add secs to datetime

2002-01-07 Thread Roger Baklund

* Kodrik
> I have datetime and I want to add a number or seconds to it. That 
> number can be greater than 60, it can actually be greater than the 
> equivalent of a years in seconds.
> 
> How do I add these seconds to the value of a datetime field 
> through an update with MySQL?

update table set datefield=datefield + INTERVAL 1 SECOND;

-- 
Roger

-
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




add secs to datetime

2002-01-07 Thread Kodrik

I have datetime and I want to add a number or seconds to it. That number can 
be greater than 60, it can actually be greater than the equivalent of a years 
in seconds.

How do I add these seconds to the value of a datetime field through an update 
with MySQL?

-
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