Description
The DAYS function calculates the number of days between two date values.
Usage
This function is used to determine the difference in days between two dates.
Syntax:DAYS(end_date, start_date)DAYS(end_date, "dd-MMM-yyyy")
- The end_date should always be the first date in the calculation.
Examples
-
Difference Between Two Attributes:
DAYS(#[Date Discovered], #[Date Occurred])Calculates the number of days between the Date Discovered and Date Occurred attributes.
-
Difference Between Completion and Discovery Dates:
DAYS(#[Date Completed], #[Date Discovered])Calculates the number of days between the Date Completed and Date Discovered attributes.
-
Difference Between a Fixed Date and an Attribute:
DAYS("12-NOV-2011", #[Todays Date])Calculates the number of days between the fixed date
"12-NOV-2011"and the Today's Date attribute.
Inputs
| Argument | Data Type | Description |
|---|---|---|
| end_date | Date | The first date attribute for the calculation. |
| start_date | Date | The second date attribute for the calculation. |
| dd-MMM-yyyy | Number | A specific date in the format "dd-MMM-yyyy". |
Returns
Type: Number
- Produces the number of days between the two specified dates.