Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: converting date to milliseconds?
Hi Dave,
It very much depends what you want to use it for if its to be of any use, but if you just want a numerical representation of the date, then you could do something like:
select to_number(to_char(sysdate,'YYYYMMDDHH24MISS')) from dual
Which will return the current date as:
20050401083413
If its millisecond timestamps you're interested in, you might want to check out the DBMS_UTILITY.GET_TIME supplied PL/SQL package - http://download-west.oracle.com/docs/cd/A87860_01/doc/appdev.817/a76936/dbms_ut2.htm#1002103
Cheers,
Mike Cretan
<laredotornado_at_zipmail.com> wrote in message
news:1112303466.399850.177620_at_g14g2000cwa.googlegroups.com...
> Hello, I'm using Oracle 8.1.7 on Solaris. How would I write a select
> statement to convert a table column of the DATE type to something
> that's a NUMBER, preferrably with units of seconds or milliseconds?
>
> Thanks, - Dave
>
Received on Thu Mar 31 2005 - 16:41:43 CST