java - Getting the current time and date on a 24 hour timescale -


I am currently having problems in 24 hours of time, as far as I know, "HH "The present time of 24 hours should be shown, however, for some reason," HH "is not exactly interpreted. This is the reason that in the following line of code, " HH: 50: 06 ul, 02. Sep. " :

  DateFormat.format ("HH: mm: ss 'ur', dd.mmm", new date ());   

Any thoughts that I am doing wrong? Using "Hh" work, however, it will produce time on a 12 hour scale, which is what I do not want to do.

Appreciate the Help!

You can use it to format the way you like it: Works:

  SimpleDateFormat sdf = new SimpleDateFormat ("HH: mm: ss"); String str = sdf.format (new date ());   

In addition to this.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -