On Thu, 8 Aug 2002 19:29:27 -0500  "Nguyen, David M" <[EMAIL PROTECTED]> wrote:

> It's number.
> 
> SQL> desc user_activity_log                                        
>  Name                                      Null?    Type           
>  ----------------------------------------- -------- ---------------
>  TIME_STAMP                                NOT NULL NUMBER(20)     
> 
> -----Original Message-----
> From: Michael A Chase [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 08, 2002 6:00 PM
> To: Nguyen, David M; [EMAIL PROTECTED]
> Subject: Re: Time_stamp column unreadable format
> 
> 
> On Thu, 8 Aug 2002 17:16:31 -0500  "Nguyen, David M"
> <[EMAIL PROTECTED]>
> wrote:
> 
> > I try to read date/time from times_tamp column in my oracle database
> but I
> > could not read it using SQL query.  Is it a way to resolve it?
> > 
> > SQL> select time_stamp from user_activity_log;
> > 
> > TIME_STAMP
> > ----------
> > 1.0220E+12
> 
> What does DESC say the type of that column is?  It looks like it might be
> numeric or you might have assigned a format using the COLUMN command.
> That is all SQL*Plus which is marginal on this list.

If it's a UNIX timestamp (seconds since 1970-01-01 0000) or a known offset
from it then you can use Perl's gmtime() or localtime() functions to
convert it to a readable date.  Oracle's TO_CHAR() might also be able to
convert it, but I don't have the manual in front of me right now.

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

Reply via email to