[Solved] Java new date() with milliseconds


You should do:

sdfDate.format(data);

This is the correct way to use your dateformatter to format a given date.

Ex.

System.out.println("Date: " + sdfDate.format(data));

4

solved Java new date() with milliseconds