Link to home
Start Free TrialLog in
Avatar of ALawrence007
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

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

Open in new window

Avatar of UnifiedIS
UnifiedIS

Is it off by x number of hours like a time zone thing?
Avatar of ALawrence007

ASKER

No, it comes back with a date of "12/31/1600". Not correct
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That was the issue.

Thanks