use HH
hh
refers to hours with the use of PM and AM. of which you do not display
String myDateString = (String) DateFormat.format("yyyy-MM-dd HH:mm", c.getTime());
As per the Android documentation
H = hour in day (0-23)
h = hour in am/pm (1-12)
Edit: There appears to be some kind of issue with H
not being supported on API below 17, so it is preferred to use kk
which is infact the proper HH
implementation.
Up to API level 17, only {@code adEhkMmszy} were supported. Note that this class incorrectly implements {@code k} as if it were {@code H} for backwards compatibility.