hi friends
i am using log4net in my project.I have created log files based on the date.the log file name is the current date.i like to get the log files created within two specified dates.
Am working on web application in ASP.NET using C#.
Printable View
hi friends
i am using log4net in my project.I have created log files based on the date.the log file name is the current date.i like to get the log files created within two specified dates.
Am working on web application in ASP.NET using C#.
Well, try to get all filenames. Then extract the date from the filename and convert to a datetime. After that you can check the date. If the date is within your date span you take the log file. If not you discard this one. So you should loop through all filenames and you have the right ones.
It is a simple algorithm. Maybe there is a better one but it should work.
Thanks a lot.