Here you can find the source of getLongOracleDateTime(Date date)
public static synchronized Double getLongOracleDateTime(Date date)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { static private SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy"); static private SimpleDateFormat sdfMonth = new SimpleDateFormat("MM"); static private SimpleDateFormat sdfDay = new SimpleDateFormat("dd"); static private SimpleDateFormat sdfHours = new SimpleDateFormat("HH"); static private SimpleDateFormat sdfMinutes = new SimpleDateFormat("mm"); static private SimpleDateFormat sdfSeconds = new SimpleDateFormat("ss"); public static synchronized Double getLongOracleDateTime(Date date) { if (date == null) { return Double.NaN; }//from w ww . j av a 2s . c o m long result = Long.parseLong(sdfYear.format(date)) * 10000000000L + Long.parseLong(sdfMonth.format(date)) * 100000000L + Long.parseLong(sdfDay.format(date)) * 1000000L + Long.parseLong(sdfHours.format(date)) * 10000L + Long.parseLong(sdfMinutes.format(date)) * 100L + Long.parseLong(sdfSeconds.format(date)); return Double.valueOf(result); } }