Skip to content

Get Time Between Dates

What it does: Calculates the time difference between two dates in various units like days, hours, minutes, or business days.

Perfect for: Duration analysis • Age calculations • SLA monitoring • Project timelines

  • Calculate differences - Find time spans between any two dates
  • Multiple units - Get results in days, hours, minutes, seconds, or years
  • Business days - Calculate working days excluding weekends and holidays
  • Precise measurements - Get exact durations for analytics and reporting
Get Time Between Dates calculation illustration
graph LR
    A[Start Date] --> B[Calculate Difference]
    C[End Date] --> B
    B --> D[Time Duration]

    style A fill:#e1f5fe
    style B fill:#e8f5e8
    style C fill:#e1f5fe
    style D fill:#f3e5f5

Simple process: Start Date + End Date → Calculate difference → Duration result

Simple Days Calculation:

  • Start: Jan 15
  • End: Jan 20
  • Result: 5 days

Detailed Duration (Hours/Minutes):

  • Start: 9:00 AM
  • End: 5:30 PM
  • Result: 8.5 hours (or 510 minutes)

Business Days (SLA Check):

  • Start: Monday, Jan 15
  • End: Monday, Jan 22
  • Result: 5 business days (The weekend is automatically excluded)

Project duration:

  • Start: January 15, 2024
  • End: February 15, 2024
  • Result: 31 days, 744 hours

Age calculation:

  • Birth date: January 15, 1990
  • Current date: January 15, 2024
  • Result: 34 years, 12,418 days

SLA monitoring:

  • Ticket created: Monday 9:00 AM
  • Ticket resolved: Wednesday 2:00 PM
  • Result: 2.2 days, 53 hours (business time)
UnitDescriptionExample
yearsFull years2.5 years
monthsCalendar months14 months
weeks7-day periods8.2 weeks
daysCalendar days58 days
business_daysWorking days only42 business days
hoursTotal hours1,392 hours
minutesTotal minutes83,520 minutes
secondsTotal seconds5,011,200 seconds

Exclude weekends:

{
"business_days_only": true,
"weekend_days": [0, 6]
}

Exclude holidays:

{
"holidays": [
"2024-01-01",
"2024-07-04",
"2024-12-25"
]
}

Complete business setup:

{
"start_date": "2024-01-15",
"end_date": "2024-01-31",
"units": ["business_days", "days"],
"business_days_only": true,
"holidays": ["2024-01-15", "2024-01-29"]
}

Project management - Calculate project durations and milestone gaps HR systems - Calculate employee tenure and vacation accruals SLA monitoring - Track response times and resolution periods Analytics - Measure time between user actions and conversions

Basic duration:

{
"start_date": "2024-01-15T10:00:00Z",
"end_date": "2024-01-20T16:30:00Z",
"units": ["days", "hours"]
}

Precise business calculation:

{
"start_date": "2024-01-15T09:00:00",
"end_date": "2024-01-25T17:00:00",
"units": ["business_days"],
"business_days_only": true,
"holidays": ["2024-01-15"],
"precision": 2
}

Negative results: End date is before start date - check date order Wrong business days: Verify holiday format is YYYY-MM-DD Timezone issues: Make sure both dates use the same timezone

Related nodes: Add To A DateSubtract From A DateGet Current Date

Common workflows: SLA MonitoringProject AnalyticsPerformance Tracking

Learn more: Date Calculations GuideBusiness Logic Workflows