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: compare dates?

Re: compare dates?

From: Werner Vesterås <vesteraas_at_removethis.usa.net>
Date: Tue, 6 May 2003 18:20:15 +0200
Message-ID: <3hRta.5363$KF1.89835@amstwist00>


select * from mytable where months_between(sysdate, timestamp) > 6

--Werner

"Bing Du Test" <bing-du_at_tamu.edu> wrote in message news:3EB7DCB8.F8BA7F2D_at_tamu.edu...
> Oracle's on-line documents are awesome but just overwhelming for me. I
> don't need to know that much to do what I need to do, I think. And I
> don't deal with Oracle very much. What I need to do is to select the
> rows whose timestamp columns have been older than 6 months compared
> with the current time.
>
> The following shows how the date was inserted in the first place:
>
> ======
> insert into mytable (id,timestamp) values
> ('123',to_date('20020326072839', 'YYYYMMDDHHMISS');
> ======
>
> I searched 'date' in the on-line SQL*Plus Quick Reference, but did not
> find anything telling me how to compare dates. So I appreciate any
> pointers. Thanks in advance.
>
> Bing
>
Received on Tue May 06 2003 - 11:20:15 CDT

Original text of this message

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