Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Team,
I am facing scenario as my script should run on:
Will This Work:?
if match(Month Start(weekday(today()), 'Sun', 'Sat') )then
exit script;
end if
Script.
Please provide your Suggestion
Thanks in Advance!
Hi Ashok,
May be like below:
If( MonthStart(today())= today() and not Wildmatch(weekday(today()), 'Sun', 'Sat')
ExPression 1;
IF(Monthstart (Today()+1= Today() and wildmatch(weekday(today()-1),'Sun','Sat')
ExPression 1;
))
Thanks,
Arvind Patil
Arvind thanks for your suggestion, Can u please elaborate this code!!
Try like:
If NOT today()=LastWorkDate(MonthStart(Today()),1) Then
Exit Script;
End If
<Script>
Edit: correction (highlighted) in function.
Tresesco thanks for your suggestion, Can u please elaborate this code!!
It is supposed to do what you wished it to do.
LastWorkDate with argument 1 - moves the date ahead if it falls in weekend. That way, you can handle the situation when a month start date falls in weekend and get the next working date, i.e a Monday like you wanted. Then we are comparing, if it is NOT today then we can safely exit the script. Or, you can remove the NOT and include the script under the conditioning, telling, the script would be executed only when today() is a month start excluding weekend.
Hi Ashok,
My best advice to you would be to get a master calendar.
Thanks for your explanation Tresesco!!