Creating Date from string (EEST format problem)
I have problem converting from string to date.
The first one i Ok:
Date d = new Date("Thu Jun 02 00:00:00 GMT+00:00 2011");
this one is fali(invalid argument):
Date d1 = new Date("Mon Jun 06 00:00:00 EEST 2011");
Any suggestion? I need universal solution that will wor开发者_Python百科k with any format.
I think the next Q&A might solve your problem: Java - convert String (EEST included) into date
In short: you cannot use Date, but must use SimpleDateFormat.
精彩评论