title: awk to calculate number of days between two dates:
body: <p>Would like to calculate number of days between two dates , for the below example,   No of days == $6-$4 position.</p>
  
  <p>Input.txt</p>
  
  <pre><code>Desc1,Desc2,Desc3,DATE_ACTIVE,STATEMENT_DATE,Desc4
  abc,def,ghi,21-MAR-08,01-JUL-14,jkl
  abc,def,ghi,01-JUL-14,15-JUL-14,jkl
  abc,def,ghi,06-NOV-06,08-JUL-14,jkl
  abc,def,ghi,18-NOV-03,08-JUL-14,jkl
  abc,def,ghi,14-JUN-06,15-JUL-14,jkl
  </code></pre>
  
  <p>Desired Output:</p>
  
  <pre><code>Desc1,Desc2,Desc3,DATE_ACTIVE,STATEMENT_DATE,Desc4,No_Of_Days
  abc,def,ghi,21-MAR-08,01-JUL-14,jkl,2293
  abc,def,ghi,01-JUL-14,15-JUL-14,jkl,14
  abc,def,ghi,06-NOV-06,08-JUL-14,jkl,2801
  abc,def,ghi,18-NOV-03,08-JUL-14,jkl,3885
  abc,def,ghi,14-JUN-06,15-JUL-14,jkl,2953
  </code></pre>
  
  <p>Have tried below commands and partial ...</p>
  
  <pre><code>awk 'BEGIN {FS=OFS=","} {print $0,$6-$4}' Input.txt
  
  awk 'BEGIN {FS=OFS=","} {print $0,$date($6)-$date($4)}' Input.txt
  </code></pre>
  
  <p>Any suggestions ..</p>