title: How to calculate the number of months between two dates in a datastage
body: <p>I need to calculate the number of months between two dates, I used to do it in Teradata using months_between function, but currently I need to the similar function or code to use in datastage. </p>
  
  <p>I have tried below code but it's not matching 100% with the results given months_between function. </p>
  
  <p>I have subtracted two dates, got number of days from it and divided it by 30.4375.</p>