In android application I'm trying to parse Date from string to find difference between two times.
SimpleDateFormat dateFormatDateAndTime = new SimpleDateFormat("ddMMyyyyHHMM");
Date startDateTime = dateFormatDateAndTime.parse("060420150134");
Log.v(TAG, "startDateTime: " + startDateTime); //Fri Oct 06 01:00:00 GMT+05:30 2017
So, I have to parse 060420150134
so that I get 06 Apr 2015 01:34
and for that my format is ddMMyyyyHHMM
But I get here Fri Oct 06 01:00:00 GMT+05:30 2017
So i'm doing what's wrong? How to parse here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…