VB.Net FileInfo.LastAccessTime not working on share

Posted on 2012-08-21
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?


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

Question by:ALawrence007
    LVL 18

    Expert Comment

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

    Author Comment

    No, it comes back with a date of "12/31/1600". Not correct
    LVL 69

    Accepted Solution


    Author Closing Comment

    That was the issue.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now