Skip to content

Get date difference

Description

Gets the difference between 2 dates in seconds, hours, days, weeks, months or hours.

Input Ports

Name dataType sourceType required description
Measurement text manual-only true The measurement type that should be calculated between the two given dates
Floating number boolean manual-only false Enabling the floating number will allow the result to have decimal numbers
Subject Date format text link-manual true The format the subject date should be
Subject date text link-manual true The start date inside of the equation
Predicate Date format text link-manual true The format the predicate date should be
Predicate Date text link-manual true The end date inside of the equation

Scenarios

  • The user wants the difference between 2 dates in seconds
  • The user wants the difference between 2 dates in minutes
  • The user wants the difference between 2 dates in hours
  • The user wants the difference between 2 dates in days
  • The user wants the difference between 2 dates in weeks
  • The user wants the difference between 2 dates in months
  • The user wants the difference between 2 dates in years

Use case

Command

Inputs
  • Measurement: months
  • Floating number: true
  • Subject date format: DD-MM-YYYY HH:mm:ss
  • Subject date: 05-01-1945 12:55:24
  • Predicate date format: YYYY-MM-DD HH:mm:ss
  • Predicate date: 05/01/2021 12:55:24:33
Experienced tips
  • If the Date format is empty, the process will continue and use the default format of YYYY-MM-DD HH:mm:ss a
  • If the predicate date or subject date is provided in a different format than the formats specified, the process will stop and provide you with the following error. Subject Date Format Invalid, try YYYY-MM-DD HH:mm:ss
Output

Output

Search Tags

Get the difference between 2 dates