Re: How to count day?
From: GHouck <hksys_at_teleport.com>
Date: Sun, 07 Jun 1998 06:08:59 GMT
Message-ID: <357A2E62.4F41_at_teleport.com>
Date: Sun, 07 Jun 1998 06:08:59 GMT
Message-ID: <357A2E62.4F41_at_teleport.com>
J. Yen wrote:
>
> I like to count day automatically and display the day with the format
> 'dd/mm/yyyy'.
> For example, the expired day will be 35 days after the sysdate. The
> sysdate is 07/06/1998 (dd/mm/yyyy), the expired day will be 11/07/1998
> (dd/mm/yyyy). Does anyone know the function to calculate this
> automatically? Thanks a lot!
I think these will do for both directions:
For date 20 days from now:
select to_char(sysdate+20,'mm/dd/yyyy') from dual
For number of days between now and 01-June-1998
select to_char(sysdate-to_date('06/01/1998','mm/dd/yyyy')) from dual
Yours,
Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys
Received on Sun Jun 07 1998 - 08:08:59 CEST