Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Date Conversion
Whoops, these are milliseconds, I drop a digit when doing my
testing.
select to_date(
to_date('1-jan-1970 00:00:00','dd-mon-yyyy hh24:mi:ss') + (col1/(1000*24*60*60))) from table_A
That formula should be
> -----Original Message-----
> From: Adams, Matthew (GEA, 088130)
> Sent: Thursday, August 31, 2000 12:46 PM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: Date Conversion
>
>
> looks like these might be 1/100ths of a second since
> 1-Jan-1970 (00:00),
> you might try
>
> select to_date( to_date('1-jan-1970 00:00:00','dd-mon-yyyy
> hh24:mi:ss') +
> (col1/(100*24*60*60))) from table_A
>
> using this formula,
> the first number below comes out as sometime on July 24th, 2000
>
>
> ----
> Matt Adams - GE Appliances - matt.adams_at_appl.ge.com
> <Discussing an image of a black rectangle silhouetted against
> the Martian
> landscape> "That is the top of the calibration target, that
> is _not_ in fact
>
> a monolith."
> - NASA TV commentator, 7/5/97
>
>
>
> -----Original Message-----
> Sent: Thursday, August 31, 2000 12:18 PM
> To: Multiple recipients of list ORACLE-L
>
>
>
> Hello List.
>
> We need to convert two columns in a table to date type.
> Currently, the two
> columns are Varchar2. This wouldn't be a problem if there
> were actual dates
> held in the columns. A Java application inserts into the
> table, and inserted
> in a format such as this:
>
> 964473249811
> 964473412927
> 964473649881
> 964473659746
> 964473882543
> 964473915782
> 964473972845
> 966970660171
>
> Each one of those values represents a date. Is there a way to
> make sense of
> this? A way to convert this to a date value Oracle will recognize. One
> developer told me these are long date values (milliseconds
> since some date
> or something).
>
> --
> Author: Adams, Matthew (GEA, 088130)
> INET: MATT.ADAMS_at_APPL.GE.COM
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Thu Aug 31 2000 - 11:57:24 CDT