My Quotes


When U were born , you cried and the world rejoiced
Live U'r life in such a way that when you go
THE WORLD SHOULD CRY






Showing posts with label Oracle equivalent of java currentTimeMillis. Show all posts
Showing posts with label Oracle equivalent of java currentTimeMillis. Show all posts

Tuesday, October 8, 2013

Oracle equivalent of java currentTimeMillis


Instead of the
queryString = "SELECT systimestamp param FROM DUAL";

use the following
select extract(day from(systimestamp - to_timestamp('1970-01-01', 'YYYY-MM-DD'))) * 86400000 + to_number(to_char(sys_extract_utc(systimestamp), 'SSSSSFF3')) current_time_milliseconds
from dual;