ALawrence007
asked on
VB.Net FileInfo.LastAccessTime not working on share
Hi to all,
I have a small VB.Net application that needs to collect file information from a share on our domain. I have noticed that the file's last access time is not correct if the file is on the share. If I copy the file to my local system the information returned is correct.
What is causing the issue? Is my code correct?
Thanks
I have a small VB.Net application that needs to collect file information from a share on our domain. I have noticed that the file's last access time is not correct if the file is on the share. If I copy the file to my local system the information returned is correct.
What is causing the issue? Is my code correct?
Thanks
Dim FileInfo As New IO.FileInfo(FileNameHere)
If FileInfo IsNot Nothing Then
Dim strLastModified As String = System.IO.File.GetLastWriteTime(convertedfile.ToString()).ToShortDateString()
End If
Is it off by x number of hours like a time zone thing?
ASKER
No, it comes back with a date of "12/31/1600". Not correct
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was the issue.
Thanks
Thanks