Sorry for bringing this up, but I don't see it. I have date+time in such format:
dd-MM-yy HH:mm
For example
15-11-11 09:36
(at the time of writing, it indicates date 5 days ago). When I try to run:
new java.text.SimpleDateFormat("dd-MM-yy HH:mm").parse("15-11-11 09:36")
I get exception:
java.text.ParseException: Unparseable date: "15-11-11 09:36"
At first I thought it is something with year (despite (-80,+20) boundary -- according to documentation). Well, maybe, but when I remove time (from string and pattern), the date is recognized correctly.
Does anyone see what I don't see?
Update
My system (Linux) short date format:
YYYY-MM-DD
long:
WEEKDAY DD MONTH YYYY
and time:
HH:MM:SS
However I thought the purpose of giving the pattern is to be locale independent.
Out of curiosity I added ":ss" to pattern and ":01" to string, still exception.
mystring.split("\\D");- mike jones