SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Date Calculation

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Date Calculation
Author Message
Michael Tuszynski



Joined: 07 May 2004
Posts: 30

Post Date Calculation Reply with quote

How using JAL can I calculate the last business day of the month prior to current month?

Fri May 28, 2004 10:38 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7955

Post Re: Date Calculation Reply with quote

Dim last_day, date, "@MF"mm/dd/yyyy""
Dim is_weekend, boolean
Dim is_holiday, boolean

CHECK_PREV_DAY:
DateAdd last_day, -1, last_day
IsWeekend last_day, is_weekend
If is_weekend, CHECK_HOLIDAY, CHECK_PREV_DAY
CHECK_HOLIDAY:
IsHoliday last_day, is_holiday
If is_holiday, CHECK_PREV_DAY, DONE

DONE:
// here you put your main processing

: How using JAL can I calculate the last business day of the month prior to
: current month?

Fri May 28, 2004 11:22 am View user's profile Send private message
Michael Tuszynski



Joined: 07 May 2004
Posts: 30

Post Re: Date Calculation Reply with quote

Code snippet has small bug. See below:

If is_weekend, CHECK_PREV_DAY, CHECK_HOLIDAY

: Dim last_day, date, "@MF"mm/dd/yyyy""
: Dim is_weekend, boolean
: Dim is_holiday, boolean

: CHECK_PREV_DAY: DateAdd last_day, -1, last_day
: IsWeekend last_day, is_weekend
: If is_weekend, CHECK_HOLIDAY, CHECK_PREV_DAY
: CHECK_HOLIDAY: IsHoliday last_day, is_holiday
: If is_holiday, CHECK_PREV_DAY, DONE

: DONE: // here you put your main processing

Fri May 28, 2004 1:16 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7955

Post Re: Date Calculation Reply with quote

You are absolutely correct.

: Code snippet has small bug. See below: If is_weekend, CHECK_PREV_DAY,
: CHECK_HOLIDAY

Fri May 28, 2004 1:31 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.