πŸ“… Guide: Mastering Dates & Times

Thank you for combining all this valuable info into one post!

This is also relevant here

This math formula adds N business days to a specified date assuming Saturday and Sunday are weekends. This formula will always return a business day and it doesn’t account for public holidays.

date+floor(n/5)*7+mod(n,5)-hour(date)/24-minute(date)/1440-second(date)/86400
+
2*(max(weekday(date+floor(n/5)*7+mod(n,5)-hour(date)/24-minute(date)/1440-second(date)/86400)-6,0))
+
(max(weekday(date+floor(n/5)*7+mod(n,5)-hour(date)/24-minute(date)/1440-second(date)/86400)-2*weekday(date+floor(n/5)*7+mod(n,5)-hour(date)/24-minute(date)/1440-second(date)/86400)+2,0))
6 Likes