Skip to main content

Custom SQL fields - Command to calculate duration in days between two dates

What to use in Custom SQL field: DATEDIFF(DD,[Table: Field Date1],[Table: Field Date2])    Example: where [Table: Field Date1] = [Assignment: Start Date] [Table: Field Date2] = [Assignment: Actual End

Updated over 2 weeks ago

What to use in Custom SQL field:

DATEDIFF(DD,[Table: Field Date1],[Table: Field Date2])

Example:

where

[Table: Field Date1] = [Assignment: Start Date]

[Table: Field Date2] = [Assignment: Actual End Date]

mceclip0.png

To calculate the weekday date difference between two dates in the system

DATEDIFF(dd,[Assignment: Create Date],[Assignment: Last Update Date]) - (2 * DATEDIFF(wk,[Assignment: Create Date],[Assignment: Last Update Date]))

Did this answer your question?