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: Steve Long <steven.long_at_erols.com>
Date: Sat, 28 Oct 2000 07:40:53 -0400
Message-ID: <8tedpg$af6$1@bob.news.rcn.net>

just so you know, the 1/2/24 is a mathematical calculation (1 divided by 2 divided by 24) rather than the date Jan 2, 1924.

<tedchyn_at_yahoo.com> wrote in message news:8tdoih$1ff$1_at_nnrp1.deja.com...
> here it is:
> SQL> select to_char(sysdate - 1/2/24,'mm:dd:yyyy hh24:mi:ss') from dual;
>
> TO_CHAR(SYSDATE-1/2
> -------------------
> 10:28:2000 01:06:24
>
> SQL> select to_char(sysdate,'mm:dd:yyyy hh24:mi:ss') from dual;
>
> TO_CHAR(SYSDATE,'MM
> -------------------
> 10:28:2000 01:36:57
>
> ted chyn
> In article <8td2io$h8m$1_at_nnrp1.deja.com>,
> rasx_at_my-deja.com wrote:
> > 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 Sat Oct 28 2000 - 06:40:53 CDT

Original text of this message

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