Forum Discussion

PowerPaddy's avatar
PowerPaddy
Frequent Visitor
9 years ago
Solved

DATEDIFF month interval not working as expected.

Hello again,   I'm using the DateDiff function to work out after how many months a policy was cancelled but it's not giving me the expected results. Cancellation Month = DATEDIFF([POLICYSTARTDAT...
  • v-sihou-msft's avatar
    v-sihou-msft
    9 years ago

    PowerPaddy

     

    To get more accurate "MONTHDIFF", you can create a column like below:

     

    Cancellation Month =
     ( 1
        * ( [CANCELDATE] - [POLICYSTARTDATE] ) )
        / DAY ( EOMONTH ( [CANCELDATE], 0 ) )

    Regards,