Forum Discussion
Anonymous
8 years agoNot applicable
DATEDIF months calculation
Hey guys, I'm having troubles with the DATEDIF function. I'm trying to calculate the month difference between a project end date and the date of today. I'm using: Month Delay = DATEDIFF(Proj...
- 8 years ago
Hi Anonymous,
Please use the following formula and check if it works fine.MonthDelay=ROUND(DIVIDE(DATEDIFF(DATE(2018,5,31),TODAY(),DAY),30),0)
Best Regards,
Angelia
rodrigosoaresss
6 years agoRegular Visitor
That's how I've done it
HELP =
VAR I = InicialDate
VAR F = FinalDate
VAR __t =
DIVIDE (
EOMONTH ( I, 0 )
- ( I - 1 ),
EOMONTH ( I, 0 )
- EOMONTH ( I, -1 )
)
+ DATEDIFF (
EOMONTH ( I, 0 ) + 1,
EOMONTH ( F (), -1 + 1 ),
MONTH
)
+ DIVIDE (
F ()
- ( EOMONTH ( F (), -1 ) + 1 ),
EOMONTH ( F (), 0 ) - EOMONTH ( F (), -1 )
)
return __t