Hi,
I am trying to get the correct calculation for months between 2 dates. I have some logic already in Access which I know works and I am trying to get the same out put in SQL but it's not quite there and I think it could be linked to the ROUND function which Access logic has by my SQL server logic doesn't, does anyone know what I need to apply to my SQL logic to match that in Access please? I also know that if the output is a 0, then I need my SQL to change that to a 1.
Access Logic
Months: IIf(Round((DateValue([Date_Required])-DateValue([Date_in]))/(365/12),0)=0,1,Round((DateValue([Date_Required])-DateValue([Date_in]))/(365/12),0))
SQL Server Logic
DATEDIFF(D,FINANCIALS_LIFE_TO_DATE.DATE_IN, FINANCIALS_LIFE_TO_DATE.DATE_REQUIRED) / (365/12) CONTRACT_LENGTH,