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: miliseconds since 1970 something

Re: miliseconds since 1970 something

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 30 Dec 1999 18:17:17 +0800
Message-ID: <386B312D.4F15@yahoo.com>


maylee wrote:
>
> In article <84ce9k$a9d$1_at_nnrp1.deja.com>,
> buurd_at_my-deja.com wrote:
> > No.. I mean the number of miliseconds as given by
> > java.util.Date.getTime()
> >
> > getTime()
> > Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT
> > represented by this date.
> >
> > I think that is how the systemclock works, counting miliseconds. When
> > getting the date from my database a can get the time on the milisecond
> > and it will matter in some cases. But i would prefer if i didn't have
> > to parse the date since it is a rather large number of dates that is
> > handled.
> >
> > Tia
> > Roland
> >
> > In article <h9eh6solls7bfo7rco4g5v9jv9tpd26lue_at_4ax.com>,
> > tkyte_at_us.oracle.com wrote:
> > > A copy of this was sent to buurd_at_my-deja.com
> > > (if that email address didn't require changing)
> > > On Tue, 28 Dec 1999 10:37:59 GMT, you wrote:
> > >
> > > >Hi!
> > > >How do i get Oracle server to format a date to the number of
> > > >miliseconds since 1970 something (a standardvalue used in Java). I
> > > >think i could save some cpu cycles on my appserver by doing this
> > > >translatation in the database, i'll guess the database have to do
> > some
> > > >translation work anyway so why not to this value...
> > > >
> > > >Tia
> > >
> > > I think you mean the number of seconds -- not milliseconds?
> > >
> > > If so, see
> > > http://osi.oracle.com/~tkyte/Misc/CTime.html
> > >
> > > btw: Java doesn't use the number of seconds since 1970 typically --
> > you would
> > > use Date or Calendar objects typically...
> > >
> > > --
> > > See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to
> > Oracle8i'...
> > > Current article is "Part I of V, Autonomous Transactions" updated
> > June 21'st
> > >
> > > Thomas Kyte tkyte_at_us.oracle.com
> > > Oracle Service Industries Reston, VA USA
> > >
> > > Opinions are mine and do not necessarily reflect those of Oracle
> > Corporation
> > >
> >
> > --
> > Roland Carlsson
> > Certified Java programmer
> > Skövde
> > Sweden
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
> I have the reverse problem... How do I get the date and time as
> explained by you to convert to an Oracle Date??
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

86400 seconds in a day

Thus

my_date := starting_date + value / 86400

should do the trick

HTH
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Thu Dec 30 1999 - 04:17:17 CST

Original text of this message

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