Here is the code snippet to find the last accessed date of a csv file in C#:
main.cs458 chars17 lines
In the above code, we first specify the file path of the CSV file. We then use the File.GetLastAccessTime()
method to get the last access time of the file. Finally, we output the last access time using Console.WriteLine()
. The date format used in this example is "dd/MM/yyyy HH:mm:ss", but you can use any format that suits your needs.
gistlibby LogSnag