11-08-2017 08:38 AM
I am creating a test stand that can't go more than a week without checking/ running the calibration. I plan to handle this by having the calibration expire every Sunday. If a user opens the program and the calibration program has not been run since Sunday it will open the calibration program. I don't want to make it good for X hours because I don't want the program to have to be ran in the middle of testing. Has anyone done anything like this?
11-08-2017 08:42 AM - edited 11-08-2017 08:43 AM
11-08-2017 09:30 AM
Hello GerdW,
That is the easy part. The expires every Sunday hard is the hard part.
11-08-2017 09:33 AM - edited 11-08-2017 09:34 AM
Hi jr,
so you have problems to determine the weekday for a certain timestamp?
Did you ever used Seconds to Date/Time before?
Once you know the current day of the week it's just simple mathematics to calculate the "last Sunday"…
11-08-2017 02:44 PM
%A is the format code for weekday name (or %a is abbreviated form).
Use with format date/time string ...
Enjoy.
Deceased