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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to store fractional seconds

Re: How to store fractional seconds

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Fri, 17 Nov 2000 17:18:27 +0800
Message-ID: <3A14F7E3.7EA0@yahoo.com>

Scott Mattes wrote:
>
> Shouldn't a regulare date field give you what you want (with rounding of
> course)?
>
> select to_char( sysdate, 'YYYY MM DD HH:MI:SSSSSSS' ) from dual;
>
> TO_CHAR(SYSDATE,'YYYYMMD
> ------------------------
> 2000 11 17 11:03:3978303
>
> <jlobugli_at_mwra.state.ma.us> wrote in message
> news:8v3j6s$kk4$1_at_nnrp1.deja.com...
> > I have to store a date/time down to the tenth of one second. I see my
> > options as:
> >
> > 1) Use two fields, a date field which goes down to the second and and a
> > number field storing the fraction of a second. The number field could
> > store either (a) an integer being the number of tenths of a second
> > (number(1,0)) or (b) the fraction of a second to some greater precision
> > (number(3,3)).
> >
> > 2) An Excel-like number representing the number of days since a fixed
> > time, stored to enough precision to capture at least 1/10 of a second.
> >
> > I am leaning towards option 1(a), though I am open to any other
> > suggestions. I am storing streamed instrument data so there will be
> > millions of rows stored.
> >
> > I am using Oracle7 Server Release 7.1.5.2.3. Would there be a better
> > solution with Oracle 8i? We will (hopefully) be upgrading soon.
> >
> > Thanks
> >
> > Joe LoBuglio
> > joe.lobuglio_at_mwra.state.ma.us
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

Actaully no...Date's only go down to precision of seconds...The seven S's string will be: SSSSS+SS (seconds since midnight, followed by seconds of the minute)

You could use a java routine (8i+) to get this from the OS..

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)

"Early to bed and early to rise, 
 makes a man healthy, wealthy and wise." - some dead guy
Received on Fri Nov 17 2000 - 03:18:27 CST

Original text of this message

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