[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Originally posted by Pravin Johnson:
I tried a lot..
But not able to convert this string "Mon Aug 18 10:00:00 IST 2008" to date.
Originally posted by Mike Simmons:
But for representing fixed date/times, Date is much less confusing, in my opinion -- despite the many deprecated methods, which are very clearly identified and should be avoided, and the amoral setter methods, which are not actually deprecated but which are totally unnecessary. Date should have been immutable, and anyone calling a setTime() method on a Date should be shot.
Originally posted by Pravin Johnson:
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
...
But not able to convert this string "Mon Aug 18 10:00:00 IST 2008" to date.
Consider Paul's rocket mass heater. |