06-06-2014 05:41 AM
I want to check if a file is older than a time period like 1 or 2 days then perform an action on this result?
Solved! Go to Solution.
06-06-2014 06:14 AM
Hey,
Quick and dirty see attached file.
Regards,
CMW
06-06-2014 07:45 AM
Yup this is how you do it. The only change I would make is if you are going to have a constant on your block diagram of 2 days, right click the constant, go to properties, the Display Format tab, then choose Relative time. This changes the look of the control but not the value. This way 2 days can be represented with 48 hours which is a little easier to understand then 172800 seconds. You can do this on controls too by the way.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-06-2014 07:48 AM
Oh and keep in mind that this is if the file has been modified in the last 2 days. If you want to know the file creation date, or the last date that the file was accessed you'll need some other Windows DLL calls. I believe there is also a OpenG function under File I/O that does this.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord