How do I calculate the number of weekdays between two date fields?
diffDays := (EndDate – StartDate) / 86400 + 1; strtDay := @Modulo(@Weekday(StartDate); 7); endDay := @Modulo(@Weekday(EndDate); 7); result := (diffDays – endDay + strtDay – 8) * 5 / 7 – @Max(-2; -strtDay) – @Min(1; endDay) + 5 – strtDay + endDay Can I look up Multiple Keywords using @Db functions? Yes, by separating the multiple keywords by a colon. Also, you can reference a field which contains multiple keywords, as long as that field has “Allow Multi-Values” checked ON. How do you prevent LotusScript errors when handling deletion stubs in document collections? Sometimes when you get a document collection for a LotusScript agent to handle, Notes passes you a deletion stub (this is probably a bug). In case you have to handle it, you can use this code: ‘ From Mike Woolsey ‘ IsErr_NOTES_ERROR is 4000 On Error lsErr_NOTES_ERROR Goto HandleDocError dim failureCode as Integer ‘ may be global dim test as Variant ….. set doc = dc.GetFirstDocument ‘ say this is a FTS result collection, the d
Related Questions
- Rateable Value Q: A premises has 50% of their rateable value waived as a charitable organisation. How should the applicant calculate the rateable value of the premises for conversion purposes?
- How can I calculate a formula based on two or more fields, for example, subtotal=unit_price * quantity?
- How do I calculate the number of weekdays between two date fields?