Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: date data manipulation

Re: date data manipulation

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/04/25
Message-ID: <3360EA0B.1783@iol.ie>#1/1

Shaochun Lin wrote:
>
> I am a bit confused about how to caculate the date.
> Such as how old a person. How the date handle the
> addition and subtraction. Such as if you have
> column A (date type) and column B(date type). If you
> do A+B and A-B or even sum(A). Could someone enlighten
> me a little bit. Thank,SC Lin,

The date dataype holds an absolute date value such as '3rd December 1995'. The actual internal format is not very relevant, since input and output are specified using a "mask", such as (for the above date): insert into xtable(xdatecol) values ('3/12/95','dd/mm/yy') or

                                    ('3rd Dec 1995','ddsp Mon yyyy') or
...
See any SQL manual for allowable date format masks.

Subtracting two dates gives the difference in *days*. Adding (or summing) dates makes no sense.

Chrysalis. Received on Fri Apr 25 1997 - 00:00:00 CDT

Original text of this message

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