first day of the month in workweek

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
durana
Junior Coder
Posts: 21
Joined: Tue Feb 22, 2005 3:08 pm

first day of the month in workweek

Post by durana » Mon Mar 21, 2005 12:56 pm

Hello ,

Who can help me with this problem. I have a script that should do some actions on the first workday of the month.

I tried this script but doesn't do what I want.

Day>the_day
if>the_day>3,endifmaand
DayOfWeek>weekdag
if>{(%weekdag%=2) AND ((%the_day%=1) OR (%the_day%=2) OR (%the_day%=3)},verdermaand
if>{(%weekdag%=3) AND (%the_day%=1)},verdermaand
if>{(%weekdag%=4) AND (%the_day%=1)},verdermaand
if>{(%weekdag%=5) AND (%the_day%=1)},verdermaand
if>{(%weekdag%=6) AND (%the_day%=1)},verdermaand
label>verdermaand
// some actions
label>endifmaand

Thanks Duran :roll:

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Mar 21, 2005 3:15 pm

MJT Net Support
[email protected]

User avatar
Monkster
Junior Coder
Posts: 42
Joined: Fri Oct 04, 2002 9:37 pm
Location: On an Island with Wilson

Post by Monkster » Mon Mar 21, 2005 3:33 pm

Deleted, see next post
Last edited by Monkster on Mon Mar 21, 2005 3:43 pm, edited 1 time in total.
Best Wishes,
Monkster

User avatar
Monkster
Junior Coder
Posts: 42
Joined: Fri Oct 04, 2002 9:37 pm
Location: On an Island with Wilson

Post by Monkster » Mon Mar 21, 2005 3:41 pm

Looks like support has you covered already but here's another method that seems to work ok.


Day>whatdayofmonth
DayOfWeek>whatdayofweek
If>{(%whatdayofweek% = 2) AND (%whatdayofmonth% It is the first Monday of the month
Else
// False
EndIf


If Tuesday is the first day of your week then of course
%whatdayofweek% = 3
Best Wishes,
Monkster

durana
Junior Coder
Posts: 21
Joined: Tue Feb 22, 2005 3:08 pm

Post by durana » Tue Mar 22, 2005 7:34 am

Hello Monkster,

I tried this also, but didn't work for me. I found out that this has to do with my older evaluation version. I have upgraded to 7.3 and this works now great.

Thanks
Duran

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts