Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Date calculation function

Re: Date calculation function

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 12 Jan 2005 09:26:29 -0800
Message-ID: <1105550789.252008.280290@c13g2000cwb.googlegroups.com>

Randy Harris wrote:
<snip>

> Frank, am I interpreting this correctly? If I add an integer to a
date, it
> assumes I am adding days and returns the date offset by that many
days?

Yes. An integer of 1 means you are adding 1 day i.e. 24 hours to the date. e.g.
select sysdate + 1 from dual; will return same time tomorrow.

You can also use fraction of 1 to add e.g. hours, minutes, seconds etc. e.g.
select sysdate + (1/24) from dual; will add 1 hour. select sysdate + (1/1440) from dual; will add 1 minute.

Regards
/Rauf Received on Wed Jan 12 2005 - 11:26:29 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US