How do I get the file date and time
Ältere Kommentare anzeigen
Hello folks,
in my Simulink model I want to create a block which will read from a file from time to time. The file will not be updated every time the block runs, so in order to save the performance for fopen'ing the file I would just like to check on the file date and time.
Is there any handy Matlab function which will return the file's date and time as a number (e.g. double, 32 bit int etc.)
This is for Matlab / Simulink R2012a, running on WinXP.
Thanks for any hints
Norbert
Akzeptierte Antwort
Weitere Antworten (2)
Norbert
am 26 Mär. 2012
0 Stimmen
Tony Jiang
am 2 Jun. 2016
Bearbeitet: Tony Jiang
am 2 Jun. 2016
0 Stimmen
datestr(FileInfo.date,29) will report the date only without the time info. you can play with the different formatting in datestr though..
Kategorien
Mehr zu Search Path finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!