Re: Storing Times in Oracle

From: Loyal Barber <lbarber_at_ix.netcom.com>
Date: 1996/09/30
Message-ID: <3250115B.E45_at_ix.netcom.com>#1/1


Alan Clement wrote:
>
> I have a need to store times (eg elapsed times etc) in an Oracle7
> database. As you may know there is no native TIME datatype in Oracle,
> and the DATE datatype seems inadequate as it requires a date and time.
>
> Does anyone have any suggestions, or has overcome this before ?
>
> Cheers Alan
> --
> //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
> Alan Clement
> Application Designer
> Baillie Gifford & Co.
> Edinburgh EH3 8EY
> Scotland, UK
> Tel +44 131 222 4411
> Fax +44 131 222 4486
> Business: AClement_at_BaillieGifford.co.uk
> Personal: aclem_at_ibm.net
> CompuServe: 100432,3205
> Web: http://www.tripod.com/~aclem/index.html
> \\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//
I don't understand your resistance to use date fields. They will do what you want and you can just keep the time element:

insert into my_table
(my_time)
values
(to_date ('12:41:33','hh24:mi:ss')); Received on Mon Sep 30 1996 - 00:00:00 CEST

Original text of this message