Logo
  • Portfolio
  • Blog
  • About
  • Resources
Get in touch!
Calculate business days within a date range

Calculate business days within a date range

Type
Date

Calculate business days within a date range

Output:

image

Note: The calculation does not exclude public holidays.

Logo

Portfolio

Blog

Resources

About

Contact

Notion Status

© 2025 Hyphen Productivity

YouTubeLinkedInWhatsAppPinterest
lets(
    startDate, prop("Date").dateStart(),
    endDate, prop("Date").dateEnd(),
    startOffset, startDate.day() % 7,
    endOffset, endDate.day() % 7,
    daysBetween, endDate.dateBetween(startDate, "days") + 1 + startOffset - endOffset,
    startSubtract, startOffset == 0 ? 1 : startOffset,
    endSubtract, endOffset == 6 ? 5 : endOffset,
    (daysBetween - (daysBetween / 7 * 2) - startSubtract + endSubtract).round()
)