While writing a code for a java project I used date format "dd/mm/yyyy". But another colleague writing code for the same project used "dd/MM/yyyy" format and mismatch occurred. I also observed that database date format works fine with "dd/MM/yyyy", not with "dd/mm/yyyy". So I need to know the difference between these two formats.
Asked
Active
Viewed 1,203 times
0
-
mm is for minutes. Like we have HH for Hours in 24 hours format and hh for Hours in 12 hours format. – Prateek Feb 25 '16 at 10:05
1 Answers
3
The difference can be found here https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
basically small m is minute bit M is month

Ronan
- 583
- 5
- 20