| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Simple date arithmetic
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.
Received on Fri Oct 27 2000 - 23:42:25 CDT
![]() |
![]() |