Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Difference between two dates
likw <jacky_liNOjaSPAM_at_hotmail.com.invalid>ÀÌ(°¡) ¾Æ·¡ ¸Þ½ÃÁö¸¦
news:000b8d9b.76608b41_at_usw-ex0107-049.remarq.com¿¡ °Ô½ÃÇÏ¿´½À´Ï´Ù.
> Customer_name; Start_Date; Finish_Date
> --------------------------------------
> ABC; 02-Nov-99; 10-Nov-99
> CDE; 12-Nov-99; 15-Nov-99
> GHI; 18-Dec-99; 25-Jan-00
>
> Could you help to get the difference between two Dates??
>
> I wish to have the result like below
> Customer_name; Days difference (Finish date - Start date) for each
> customer.
>
> Can you help?? I don't know how to do subtraction in SQL (Oracle).
>
>
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
> The fastest and easiest way to search and participate in Usenet - Free!
>
select finish_date - start_date from customers;
or
select trunc(finish_date - start_date) from customers;
Received on Sun Nov 07 1999 - 07:36:38 CST