Hi,
How do I check if the file's date is today's date?
i.e. FileA20120216.csv
As you can see the date in th efile is "20120216" and i would like to compare this to todays date to see if they are the same or not.
How is this done please?
Thanks
Printable View
Hi,
How do I check if the file's date is today's date?
i.e. FileA20120216.csv
As you can see the date in th efile is "20120216" and i would like to compare this to todays date to see if they are the same or not.
How is this done please?
Thanks
The following converts the string to a DateTime object:
Now all you need to do is compare that to DateTime.Now.Code:DateTime.ParseExact("20120216", "yyyyMMdd", null);