????? ????

????? ????

  • NA
  • 2
  • 2.1k

Calculate Month in between two columns and Multiply between

May 24 2014 9:42 AM
ApplicantName  ||   Amt  || Date of Opening
Mr. Abc..............||..500....||..1 Jan 2014
 
 
1) I have to calculate the total months from 'Date of Opening' to 'Current Date'
 
I did like this :-
Select ApplicantName,Amt,DateOfOpening,DATEDIFF(month, DateOfOpening, GETDATE()) AS Month from ApplicantInfo 
 
I got this result -
ApplicantName || Amt || Date of Opening|| Months
Mr. Abc.............||..500..||..1 Jan 2014........|| 5
(This works currectly)
 
2) Now i want to add another extra column for calculation this.
Total Amt = Amt * Months (i.e. 500 * 5)
 
How I can do this? 
 
 
 

Answers (1)