Hello,
I would automatically trigger an action each day from a given day for 15 days and then stop for 10 days and again for 15 days and then stop for 10 days, so for 2 or 3 years.
GivenDay is the given day
I don't find the adequate double loop
I have tried like this but it's no good.
Now = DateTime.Now
nbrDays = (now-GivenDay)/DateTime.TicksPerDay
Dim y, i As Int
For i = 1 To 15
For y = 1 To 300
If NbrDays = i +10*y Then
ACTION
Exit
End If
Next
Next
Thank you
I would automatically trigger an action each day from a given day for 15 days and then stop for 10 days and again for 15 days and then stop for 10 days, so for 2 or 3 years.
GivenDay is the given day
I don't find the adequate double loop
I have tried like this but it's no good.
Now = DateTime.Now
nbrDays = (now-GivenDay)/DateTime.TicksPerDay
Dim y, i As Int
For i = 1 To 15
For y = 1 To 300
If NbrDays = i +10*y Then
ACTION
Exit
End If
Next
Next
Thank you