Businessdays calculation lotus script

@buainessdays is very usefull in calculating business days between two dates. But could not find a function in lotus script. But we can make use of evaluate function.

result = evaluate(|@businessdays(startdate; enddate; daystoexclude;datestoexclude)|)

Also make sure you are passing date values in string and not as notesdatetime object.

Set dtStart = New NotesDateTime(StartDate)
Set dtEnd = New NotesDateTime(EndDate )

busdays = Evaluate({@BusinessDays([ } & Cdat(dtStart.DateOnly) & {]; [} & Cdat(dtEnd.DateOnly) & {]; 1:7)})

Leave a Reply

Your email address will not be published. Required fields are marked *