title: How to calculate two columns subtraction in PigLatin?
body: <p>I have a table with 15 columnns.</p>
  
  <p>2 of this columns has date format, for example: 09/08/2003. One column data_1 is a start date, another data_2 end date.</p>
  
  <p>I need to count a difference between this to columns and to check if this difference is more than 30 days.</p>
  
  <p>The result must be a table with column that shows values that are more than 30 days difference and all the other 15 columns.
  Script could be something simmilar to this:</p>
  
  <pre><code>table = LOAD '$INPUT' AS (data_1, data_2, a1, a2, ... a13);
  ggdif = (data_2 - data_1);
  C = FILTER table BY (ggdif &gt; 30) AS differ;
  D = FOREACH C GENERATE a1 .. a13;
  STORE D INTO '$OUTPUT' USING PigStorage('\t');
  </code></pre>
  
  <p>I have some problems with this task:</p>
  
  <ol>
  <li><p>How to count a difference between 2 columns values?</p></li>
  <li><p>How to put date in the right format in pig?</p></li>
  </ol>