How do I get a file's date and time stamp?
I have found the FileGetDate() function but can someone show me how to use it in a program!
Using Visual Studio 6.0.
Printable View
How do I get a file's date and time stamp?
I have found the FileGetDate() function but can someone show me how to use it in a program!
Using Visual Studio 6.0.
http://www.google.com/search?q=FileGetDate
Bound to run across an example sooner or later...
Where?Quote:
I have found the FileGetDate() function
I have found it msdn but the implementation they have given is very complicated!!
Are you sure it wasn't a VB function (since MSDN covers that too)?Quote:
Originally Posted by Lord CyKill
No, I am using VC++ 6.0 and i searched in its help!
it also covers VB and C# and the J and all the other compilers that Visual Studio has.. Make sure its for Visual C++ not something else
It's GetFileTime(). The only issue with that function is that it uses a handle to the file rather then a name, but it is easy to get a handle using CreateFile() for example.
Another method would be to use FindFirstFile() with the filename as the search mask. I have a 3 part tutorial starting here which shows, amongst other things, how to extract info from the file data block.
Yeah, that tutorial was excellent!But here is another 1 comming.
How can i compare the 2 dates/time strings?