| Author |
getting wrong value after converting a string into date
|
aman thind
Ranch Hand
Joined: Jun 29, 2007
Posts: 71
|
|
Here is my code:
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd");
dateFormat.setLenient(true);
Date convertedDate=null;
convertedDate = dateFormat.parse(2008-08-25);
Date and year are coming correct but month is always showing Jan
Little help here please
|
Aman Thind
SCJP,SCWCD
JAVA utte mar JAVA,mit JAVA
|
 |
Martin Vanyavchich
Ranch Hand
Joined: Sep 16, 2008
Posts: 241
|
|
I think you mean months and not minutes
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
|
 |
aman thind
Ranch Hand
Joined: Jun 29, 2007
Posts: 71
|
|
Isn't that be default months??
OOps thanks a lot
|
 |
 |
|
|
subject: getting wrong value after converting a string into date
|
|
|