SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Last business day of week

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Last business day of week
Author Message
Mike Ford



Joined: 18 Jul 2000
Posts: 11

Post Last business day of week Reply with quote

Is there a macro-parameter that will determine the last business day of the week? I did not see any in the Help, but thought it might exist.

Wed Oct 04, 2000 6:14 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6485

Post Re: Last business day of week Reply with quote

Sorry, there is no such macro-parameter. You will need to implement it yourself
using "backward" loop from the last calendar day of week. Here is the sample script using the following logic:

// get today's date
Today( dt )
// get current day number
DayNumber( dt, day )
// find end of this week
Subtract 7, day, day
DateAdd( dt, day, dt )
// subtract 1 day for American calendar, subtract 2 days for Europian calendar
// this depends on what is counted as the last day of week (Sunday, Saturday)
DateAdd( dt, -2, dt )
// Check holidays
isHoliday( dt, hd )
LoopWhile( hd, END_LOOP )

DateAdd( dt, -1, dt )

isHoliday( dt, hd )
END_LOOP:

// all done, dt now = last bus. day of week

: Is there a macro-parameter that will determine the last business day of the
: week? I did not see any in the Help, but thought it might exist.

Wed Oct 04, 2000 10:24 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.