<html><body><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt;"><div>All,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>How can I convert to date when querying the radusage table with timestamp stored as integer?<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>TIME_STAMP NUMBER(38)</div><div><br data-mce-bogus="1"></div><div><p style="margin: 0px;" data-mce-style="margin: 0px;">SQL> select time_stamp from radusage where rownum<3;</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br data-mce-bogus="1"></p><p style="margin: 0px;" data-mce-style="margin: 0px;">TIME_STAMP<br>----------<br>1143874140<br>1143874141</p></div><div><br data-mce-bogus="1"></div><div>Neither of the SQL queries below works.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>SQL> select to_char(to_date(TIME_STAMP,'YYYYMMDDHH24MISS'), 'YYYY-MON-DD HH24:MI:SS') from radusage;<br>select to_char(to_date(TIME_STAMP,'YYYYMMDDHH24MISS'), 'YYYY-MON-DD HH24:MI:SS') from radusage<br> *<br>ERROR at line 1:<br>ORA-01843: not a valid month</div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>SQL> select to_char(to_date(TIME_STAMP,'YYYY-MM-DD HH24MISS'), 'YYYY-MON-DD HH24:MI:SS') from radusage;<br>select to_char(to_date(TIME_STAMP,'YYYY-MM-DD HH24MISS'), 'YYYY-MON-DD HH24:MI:SS') from radusage<br> *<br>ERROR at line 1:<br>ORA-01861: literal does not match format string</div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div>Rohan<br data-mce-bogus="1"></div></div></body></html>