Get date with millisecond from table
i want to get date format with milliseconds from table into variable. How to achieve this?
SQL> create table test_date (col1 date);
Table created
SQL> insert into test_date values(sysdate);
1 row inserted
SQL> commit;
Commit complete
SQL> select * from test_date;
COL1
-----------
12/18/2009
Here i have to get datewith millisecond format and put it in variable with varchar2(50) and pass this
to Java.
SQL> select to_char(COL1,'mm/dd/yyyy hh24:mi:ss.FF') from test_date;
select to_char(COL1,'mm/dd/yyyy hh24:mi:ss.FF') from test_date
ORA-01821: date format not recognized
SQL>
Thanks,
kannan