adding seconds to timestamps
732261Nov 6 2009 — edited Nov 10 2009how to add second to timestamps or date.?
i have tried below query to add seconds in timestamps.
select
to_char(systimestamp,'dd-mm-yyyy hh24:mi:ss') as ts,
to_timestamp(
to_char(sysdate,'dd-mm-yyyy hh24:mi:')
||
to_char(
to_number(
to_char(systimestamp,'ss')
) + 10),'dd-mm-yyyy hh24:mi:ss'
) as ts_1
from dual
the above query is working fine.
but suppose in case if original seconds(system time) are 45 sec then if we tried to add 30 seconds then it throws error saying that seconds should be between 0 and 59.
i got the main cause of this error but not able to correct it and how to resolve this error.
plz reply......
thnx in advnc.