Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi,
You can use Weekday() function.. something like this:
if(WeekDay(Datefield)<5,Datefield,weekstart(Datefield,1))
HTH
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.
LastWorkDate()
Thanks, but this function requires "no_of_workdays" which cann't be defined
Weekstart(Datefield,1) have offset 1 which will force the startdate to be next week's first working date.. for example
Try 'no_of_workdays' as 1.
Hi
for that you please prepare one master which contains all hoilidays
and bring that into application then avoid these days in application
If(Match(WeekDay(DateField),'Sat','Sun'),LastWorkDate(DateField,1,YourHolidayList),LastWorkDate(DateField+1,1,YourHolidayList))