Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How to store fractional seconds
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 guyReceived on Fri Nov 17 2000 - 03:18:27 CST
![]() |
![]() |