?
Solved

VB.Net FileInfo.LastAccessTime not working on share

Posted on 2012-08-21
4
Medium Priority
?
1,044 Views
Last Modified: 2012-08-22
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

0
Comment
Question by:ALawrence007
  • 2
4 Comments
 
LVL 18

Expert Comment

by:UnifiedIS
ID: 38316191
Is it off by x number of hours like a time zone thing?
0
 

Author Comment

by:ALawrence007
ID: 38316241
No, it comes back with a date of "12/31/1600". Not correct
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 38316253
0
 

Author Closing Comment

by:ALawrence007
ID: 38320249
That was the issue.

Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question