Creating a new log file each day in C#
- by Jason T.
As the title implies how can I create a new log file each day in C#? Now the program may not necessarily run all day and night but only get invoked during business hours. So I need to do two things.
1) How can I create a new log file each day? The log file will be have the name in a format like MMDDYYYY.txt
2) How can I create it just after midnight in case it is running into all hours of the night?