Re: Why Oracle is not adding a second to date/time:

From: Thomas Kellerer <FJIFALSDGVAF_at_spammotel.com>
Date: Fri, 06 Feb 2009 00:20:52 +0100
Message-ID: <6v1aikFhsm38U1_at_mid.individual.net>


zigzagdna_at_yahoo.com wrote on 05.02.2009 23:49:
> I am using Oracle 10.2 on HP UNIX 11i
>
> I have table lasttime with a column runtime (of type date)./
> select * from lasttime;
> 02/04/2009 22:35:38
> I want to add one second
> to runtime. I am unable to do it using following statement:
>
> Update lasttime set runtime = to_date('20090204223538',
> 'YYYYMMDDHH24MISS') + 1/(24 * 60 *60);
>
> It still shows me:
> select * from lasttime;
> 02/04/2009 22:35:38
>
>
> I can always add a minute or hour but second does not work. I do not
> know what I
> Am doing wrong?
>
>

Try this:

UPDATE lasttime
SET runtime = runtime + INTERVAL '1' SECOND;

Thomas Received on Thu Feb 05 2009 - 17:20:52 CST

Original text of this message