![]() Loading |
| VBScript |
| JavaScript |
| Powershell |
Search Options: Tell If a Script is Running on the First or Second Monday of a Month
|
||
|
Dim arrMondays(1)
dtmMonth = Month(Date) dtmYear = Year(Date) dtmDate = CDate(dtmMonth & "/1" & "/" & dtmYear) Do Until i = 1 intWeekDay = Weekday(dtmDate) If intWeekDay = 2 Then arrMondays(0) = dtmDate arrMondays(1) = dtmDate + 7 Exit Do End If dtmDate = dtmDate + 1 Loop For Each strMonday in arrMondays If Date = strMonday Then Wscript.Echo "Carry out the task." Else Wscript.Echo "Don't carry out the task." End If Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: | ||