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: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 12 Jan 2005 18:17:33 +0100
Message-ID: <41e55ba4$0$6606$626a14ce@news.free.fr>

"Randy Harris" <randy_at_SpamFree.com> a écrit dans le message de news:mScFd.14243$by5.6628_at_newssvr19.news.prodigy.com...
| "Frank Piron" <empty_at_zero.nil> wrote in message
| news:opskhxsepwm0et4w_at_news.online.de...
| > Am Wed, 12 Jan 2005 14:59:48 GMT schrieb Randy Harris
| <randy_at_SpamFree.com>:
| >
| > > Is there a function that will calculate a date based on a number of
| weeks
| > > offset from another date? Something like Add_Months, but for weeks
| > > (Add_Weeks?)
| > >
| > >
| > function Add_Weeks(Start_Date in date,
| > Weeks_To_Add in number) return date
| > is
| > begin
| > return Start_Date + Weeks_To_Add * 7;
| > end Add_Weeks;
| > /
| >
| > Regards,
| > --
| > Frank Piron,
| > defrankatkonaddot
| > (leftrotate two)

|

| 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, and if you add 1/24 you add one hour, 1/1440 one minute, 1/86400 one second.

Regards
Michel Cadot Received on Wed Jan 12 2005 - 11:17:33 CST

Original text of this message

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