Ooops. Should have written to_date('01/01/1970', 'MM/DD/YYYY') + TIME_STAMP / 86400
The timestamp is in seconds since 1/1/1970, while Oracle date arithmetic is in days. Sorry. "Nguyen, David M" wrote: > > Yes, it is a Unix timestamp. I use your syntax and I got following error. > > 1 select > user_name,client_ip,node_name,to_date('01/01/1970','MM/DD/YYYY')+tig > 2 where user_name = 'admin' > > 3* order by time_stamp > > SQL> / > > select user_name,client_ip,node_name,to_date('01/01/1970','MM/DD/YYYY') + > time_stamp from user_activity_log > * > > ERROR at line 1: > > ORA-01841: (full) year must be between -4713 and +9999, and not be 0 > > > > -----Original Message----- > Sent: Wednesday, March 05, 2003 3:25 PM > To: Multiple recipients of list ORACLE-L > > David, > > I presume that your date is a Unix timestamp. > > Try to see whether > > to_date('01/01/1970', 'MM/DD/YYYY') + TIME_STAMP > > yields something more meaningful to you ... > > -- > Regards, > > Stephane Faroult > Oriole Software -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Stephane Faroult INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (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 also send the HELP command for other information (like subscribing).