The code below gives me the current time. But it does not tell anything about milliseconds. public static String getCurrentTimeStamp() { SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//dd/MM/yyyy Date now = new Date(); String strDate = sdfDate.format(now); return strDate; } I have a date in the format YYYY-MM-DD HH:MM:SS (2009-09-22 16:47:08). But I want to retrieve the cu