Java new date() with milliseconds -
Java new date() with milliseconds -
i got this:
simpledateformat sdfdate = new simpledateformat("yyyy-mm-dd hh:mm:ss.sss"); date info = new date(); how can "data" variable in "sdfdate" format?
i need output (it must current time):
2014-11-10 17:48:20.128
you should do:
sdfdate.format(data); this right way utilize dateformatter format given date.
ex.
system.out.println("date: " + sdfdate.format(data)); java
Comments
Post a Comment