title: c# convert PDF metadata CreationTime to DateTime
body: <p>I need to process the CreationTime I retrieve from the PDF's metadata and compare it to DataTime format.</p>
  
  <pre><code>string path = e.Row.Cells[1].Text;
  var pdfReader = new PdfReader(path);
  var CreatedDate = pdfReader.Info["CreationDate"];
  e.Row.Cells[13].Text = Convert.ToString(CreatedDate);
  </code></pre>
  
  <p>This returns a Date-Time-String like:</p>
  
  <ul>
  <li>D:20150710080410</li>
  <li>D:20150209075651+01'00'</li>
  </ul>
  
  <p>and to compare:</p>
  
  <pre><code>            DateTime Created = Convert.ToDateTime(CreatedDate);
              DateTime Compare = Convert.ToDateTime(e.Row.Cells[14].Text);
              if (Compare &gt; Created)
              {
                  e.Row.Cells[15].Text = "actualizar";
              }
  </code></pre>
  
  <p>Martin</p>