02-01-2024 02:30 AM
I am trying to work out how to create a program that gives the user a popup saying 'windows needs an update' every 2nd Thursday of the month. The pop up needs to occur at midnight when the 2nd Thursday of the month first starts.
Would anyone be able to help I am not to sure where to start.
Thank you
Hraym
Solved! Go to Solution.
02-01-2024 03:01 AM - edited 02-01-2024 03:06 AM
Hi hraym,
@hraym2004 wrote:
The pop up needs to occur at midnight when the 2nd Thursday of the month first starts.
Determine the "day of week" of the 1st day of the month using the DateTime ToSeconds/FromSeconds functions. Once you know the "day of week" of the 1st you can easily determine the 2nd Thursday of the month by simple math...
Suggestion to start:
02-01-2024 03:32 AM
Thank you for your help
02-01-2024 05:11 AM
I am looking at doing the maths.
Would you make an offset for each day of the week and then code that into labview?
Kind regards
Hraym
02-01-2024 05:42 AM - edited 02-01-2024 05:43 AM
Hi hraym,
@hraym2004 wrote:
Would you make an offset for each day of the week and then code that into labview?
Examples:
day of week = 1 -> 2nd Thursday = 12
...
day of week = 5 -> 2nd Thursday = 8
day of week = 6 -> 2nd Thursday = 14
day of week = 7 -> 2nd Thursday = 13
You can create a simple lookup table or implement some math (including one Modulo operation)...
(With a sheet of paper and a pencil this should be an easy task!)