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

Home -> Community -> Usenet -> c.d.o.server -> Re: Simple date arithmetic

Re: Simple date arithmetic

From: <rasx_at_my-deja.com>
Date: Mon, 30 Oct 2000 18:10:44 GMT
Message-ID: <8tkdir$tbq$1@nnrp1.deja.com>

Many thanks to you all and thanks to Sybrand Bakker for pointing me in the right direction. SYSDATE units are by default in days. I hope this is a correct assumption. In any case, thanks very much for solving this particular problem!

In article <972737846.11771.0.pluto.d4ee154e_at_news.demon.nl>,   "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
> select sysdate - (30 / (24*60))
> from dual;
>
> dates are measured in days, the above fraction is expressing 30
 minutes, as
> there are 24 hours in a day and 60 minutes in each hour.
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
> <rasx_at_my-deja.com> wrote in message

 news:8td2io$h8m$1_at_nnrp1.deja.com...
> > As a product of MS SQL Server culture, I am at a significant loss
 when
> > trying to do simple date arithmetic in Oracle 7.
> >
> > For example, how do I shave off 30 minutes from SYSDATE?
> >
> > This does not seems to work:
> >
> > SELECT SYSDATE - TO_DATE(30,'MI') OUT FROM DUAL;
> >
> > Do I need to use a TO_CHAR() somewhere?
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Oct 30 2000 - 12:10:44 CST

Original text of this message

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