Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Date: Identify Next working day

HI Team,

I have requirement in which we need to exclude weekends & holidays while deriving the new transaction date.

eg; I have data received today but due to cutoff time we need to push it for next day. While calculating new date weekends & holidays needs to be ignored.

Request members to provide suggestions to implement. If anybody has already done similar then please share the code.

Thanks in Advance

8 Replies
sushil353
Master II
Master II

Hi,

You can use Weekday() function.. something like this:

if(WeekDay(Datefield)<5,Datefield,weekstart(Datefield,1))

HTH

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Thanks for quick reply.

We can use this function to identify week end & weekday. But my requirement is for any given date i should be able to provide next working day ,should exclude Saturday, Sunday & Holidays if any.

eg 4th Nov is Friday, next working for this date is 7th Nov Again if 7th is holiday then it should give me 8th Nov.

tresesco
MVP
MVP

LastWorkDate()

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Thanks, but this function requires "no_of_workdays" which cann't be defined

sushil353
Master II
Master II

Weekstart(Datefield,1) have offset 1 which will force the startdate to be next week's first working date.. for example

tresesco
MVP
MVP

Try 'no_of_workdays' as 1.

krishna20
Specialist II
Specialist II

Hi

for that you please prepare one master which contains all hoilidays

and bring that into application then avoid these days in application

Anonymous
Not applicable

If(Match(WeekDay(DateField),'Sat','Sun'),LastWorkDate(DateField,1,YourHolidayList),LastWorkDate(DateField+1,1,YourHolidayList))