Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query for Days Between Dates in Records?
Use subtraction. For example
select date1 - date2
from dual
will give you the number of days between date1 and date2.
SQL>l
1 select to_date('02-jan-97') - to_date('01-jan-97')
2* from dual
SQL>/
TO_DATE('02-JAN-97')-TO_DATE('01-JAN-97')
1
SQL>
In article <33b2c4b3.24882589_at_news.interport.net>, ascharf_at_grapevines.com
says...
>
>
>
>Alan Z. Scharf
>GrapeVine Systems
>New York City
>_________________________
>http://www.grapevines.com
Received on Fri Jun 27 1997 - 00:00:00 CDT