Skip to content

Formula (Extended): $DATEDIF Function

Overview

Calculate the number of days, months, or years between two dates.

Syntax

$DATEDIF(Start Date,Completion Date,Calculation Unit)

Parameters

Parameter Type Required Description
Start Date Date/time in yyyy/mm/dd or yyyy/mm/dd hh:mm:ss format, or an equivalent date string Required Error if start date > end date.
Completion Date Date/time in yyyy/mm/dd or yyyy/mm/dd hh:mm:ss format, or an equivalent date string Required Error if start date > end date.
Calculation Unit 'Y': Years
'M': Months
'D': Days
'H': Hours
'N': Minutes
'S': Seconds
'MD': Number of days from start date to end date. Months and years in date are ignored.
'YM': Number of months from start date to end date. Days and years in date are ignored.
'YD': Number of days from start date to end date. Years in date are ignored.
Required

Column Usable as Parameters

Parameter Classification Numeric Value Date Description Check
Start date Yes No Yes Yes No
Completion Date Yes No Yes Yes No
Calculation Unit Yes No No Yes No

Return Value

The number specified as the calculation unit (number of years/months/days/hours/minutes/seconds).

Return Value Display Content

Target Display Content of Return Value
Classification (including title, status, manager, owner) Display return value. In the case of a drop-down list with values, the options that match the return value are displayed.
Numeric Value (including work volume, progression rate, remaining work volume) Display return value
Date (including start and completion) Do not display
Description (including content) Display return value
Check (including lock) Do not display

Usage Example ①

Specify the parameter by the screen column name (name displayed). The calculation unit is "Y".

Formula

Formula using the $DATEDIF function in usage example 1

Parameters

Parameters specified in usage example 1 of the $DATEDIF function

Calculation Result

Calculation result of usage example 1 of the $DATEDIF function

Supported Versions

Supported versions Body
1.4.18.0 and later Added 'H', 'N', and 'S' to the "Calculation Unit" parameter