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
![How to get the current time in YYYY-MM-DD HH:MI:Sec.Millisecond format in Java?](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)