my current date format is: 08/11/2008 00:00
I need to convert this output to 2008/11/08 00:00 However, using SimpleDateFormat, as has been investigated, it cannot do this and give me a completely different result, here are my codes: Follow:
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy/MM/dd HH:mm")
Date starting= simpleDateFormat2.parse(startTime);
System.out.println("" + simpleDateFormat2.format(starting) + " real date " + startTime);
I know that I understand the correct line, given that the following output occurs:
0014/05/01 00:00 real date 08/11/2008 00:00
I'm not too sure how the mechanics 0014/05/01 00:00 are discovered instead
2008/11/08 00:00
I look forward to all suggestions Thank you in advance
source
share