FileDateTime - created vs. modified, also extents

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

FileDateTime - created vs. modified, also extents

Post by ChrisGreaves »

I would appreciate any first-hand experience on VBA FileDateTime with respect to different file types.

This page and this page discuss the meanings of "date" in the File Explorer panes; also date Created/Modified/Accessed.

Both pages introduce "depends on what kind of folder" and "If the file is a photo from a camera, the vague 'date' column shows the datetime on the camera as that is the time it thinks is the real 'created' date. NOT the time on the PC when it was taken" and other subtleties.
"The "Date" column takes the earlier of "Date created" and "Date modified"." seems to apply only to the display within File Explorer.

I am amassing an array of file names based on the file's date.
My GUI can allow the user to choose between "date created" and "date last modified"
The Word2003/VBA help files tell me that the FileDateTime "Returns a Variant (Date) that indicates the date and time when a file was created or last modified.".

All of which leaves me at sea.
My user can elect to study files of only JPG/BMP/GIF extents, which suggests that a camera date might be involved.
Or MP3/WAV, in which case the good old "created or modified whichever comes first" rule might apply.

In short: Choosing files based on any form of "date" seems to be a minefield with no chance of establishing a clear path.

Is this (first-hand experience with VBA) your position too?

Thanks
Chris
There's nothing heavier than an empty water bottle

User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: FileDateTime - created vs. modified, also extents

Post by John Gray »

Oldie but goodie: XXCOPY technical bulletin from the year 2000 on NTFS File Dates and Time.

Précis: all file dates are inconsistent, but Modified date is the least inconsistent. :sad:
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15619
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: FileDateTime - created vs. modified, also extents

Post by ChrisGreaves »

John Gray wrote:
22 Aug 2020, 16:05
Précis: all file dates are inconsistent, but Modified date is the least inconsistent. :sad:
xcllnt Prcs :Clppng:
Cheers
Chris
There's nothing heavier than an empty water bottle

LisaGreen
5StarLounger
Posts: 964
Joined: 08 Nov 2012, 17:54

Re: FileDateTime - created vs. modified, also extents

Post by LisaGreen »

WOW!! ... And a great link John!

Lisa