I’m writing a program to generate a report based on the date range entered by the user.I have to read some zip files which contain the date in the mm/dd format.The problem is user should enter the date in mm/dd/yyyy format and compare the dates present in the files
The year part is mentioned in the file name i.e.20120228.log contains the data for the year 2012.
How do I get this year part from all the files to compare with the date entered by the user?
Please help me on this
http://www.vogella.com/articles/JavaRegularExpressions/article.html
This will help you. Use a regular expression to split the string.
Once you have the date in this format: 20120228 you can easily find the date from it.