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

Home -> Community -> Usenet -> c.d.o.misc -> Re: converting timestamp in milliseconds to date or vice-versa in oracle

Re: converting timestamp in milliseconds to date or vice-versa in oracle

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Fri, 4 Feb 2005 06:46:19 -0800
Message-ID: <e_qdnT94qok5F57fRVn-iw@comcast.com>

<ameyas7_at_yahoo.com> wrote in message
news:1107525884.144586.315700_at_z14g2000cwz.googlegroups.com...
> hey folks,
>
> we have a varchar2 col which stores the timestamps (records r added frm
> java app which logs the currentTimeInMillis on that System)
> now i want to write a procedure which will delete records older than
> say 45 days
> i can get the current date using sysdate but this is in DATE format
> whereas my column is in varchar2 (also the value is in millis)
> how do i convert from millis to date or vice-versa
>
>
> regards
> amey
>

So you store numbers in a varchar field. That makes sense. How would you do it by hand? Date can be converted to a variety of formats, look at the doco. (sql reference book).
Jim Received on Fri Feb 04 2005 - 08:46:19 CST

Original text of this message

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