Results 1 to 4 of 4

Thread: [Resolved] System.IO.FileInfo - Date Modified

Threaded View

  1. #1

    Thread Starter
    Addicted Member jordan23's Avatar
    Join Date
    Dec 2002
    Posts
    166

    [Resolved] System.IO.FileInfo - Date Modified

    I am trying to get the same date/time as you see in windows explorer for a file and I am using the following code.

    Code:
                    FileInfo myInfo = new FileInfo(listBox1.Items[i].ToString()) ;
                    myInfo.Refresh();
                    string dateInfo = myInfo.LastWriteTime.Date.ToLongDateString() + " " + myInfo.LastWriteTime.Date.ToLongTimeString();
    The date is correct but the time is always 12:00. Any ideas? Thanks in advance.
    Last edited by jordan23; Aug 24th, 2007 at 06:18 AM. Reason: Resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width