Re: Data Type: DATETIME supported?
From: Ronan Miles <milesr_at_entcf2.agw.bt.co.uk>
Date: 1996/12/05
Message-ID: <32A69B7A.39A3_at_entcf2.agw.bt.co.uk>#1/1
Date: 1996/12/05
Message-ID: <32A69B7A.39A3_at_entcf2.agw.bt.co.uk>#1/1
Alan Kong wrote:
>
> When I created table with Data Type: datetime, it reported that it was an
> invalid data type. I wonder wether this datatype is supported in Oracle.
>
> I wanted to save both date and time to an attribute in my database. The
> version of Oracle is: 7.1.3.3.3.
Use the Date datatype, this does hold both the date and the time (to a
granularity of seconds). You then need to use format masks in the
to_char function to get the display of your choice.
Be aware that becuase Oracle does store date and time in this datatype, queries of the sort col = date are best handled with trunc(col) = date.
Trunc on a date datatype has the effect of rounding back to the midnight. Received on Thu Dec 05 1996 - 00:00:00 CET