sysdate and milliseconds
ChrisOct 15 2012 — edited Oct 15 2012Hello,
I am converting a piece of java code to PL/SQL but I have one problem left in this part:
String url = String.format("%s/%s/%s.pdf",
"/doma/gijz/lh",
directory,
(new Date()).getTime());
In java I will get something like this "/doma/gijz/lh/pdf/1350287404314.pdf
1350287404314 is the number of milliseconds after januari 1, 1970.
In Oracle I tryed this one but it does not give me the same precission.
select to_number(sysdate - to_date('01-01-1970','dd-mm-yyyy' )) *24 *60*60 *1000 from dual;
1350296586000 < missing the milliseconds.
I tryed to use timestamp but I cant figure out how get milliseconds from a timestamp.
Anyone know a solution?