Hi,
I am parsing a text file and have to store the require information into database. The text file is simply an ASCII file. It has date in it which has following format:
YYYY-MON-DD
Example:
2001-jan-12
2006-feb-17
I get date in the form of String and have to store it into Date format. I want a method to be written so I can reuse it later. The sketch of the method is:
Date strToDate(String date){
...
// code goes here
...
Date date = new Date(year,month,day);
return date;
}
I would be thankful if someone can guide me.
Regards.