FileInfo.CreationTime resolution

Hi everyone,
I was wondering if anyone here could help me.  I need to find out if the resolution of a FileInfo.CreationTime allows for milliseconds.  I'm opening a pre-existing file on the hardisk and using FileInfo to retrieve its attributes including CreationTime.  I need to sort these files but many are created within the same second.  After debugging it seems that the resulting DateTime object returned by this method only returns to a resolution in seconds with Milliseconds being 0 for each file.  Is it possible to get resolution in Milliseconds

Thanks,
Neil



Answer this question

FileInfo.CreationTime resolution

  • Carlos Enrique Figueroa

    Both FAT and NTFS store creation times down to the millisecond.  You should get the milliseconds back in the CreationTime DateTime value.

    Josh



  • Thomas Danecker

    Thanks very much for your answer.  You are correct, I discovered the reason I couldn't get resolution at millisecond level was because the files I was accessing were compressed in a zip file prior to access.  Apparently this disrupts the created time and sets milliseconds to zero.

    Neil

  • FileInfo.CreationTime resolution