Goran Bibic

Goran Bibic

  • 484
  • 2.9k
  • 196.1k

Remove time in itextsharp pdf document

Apr 17 2018 4:07 PM
Remove time in itextsharp pdf document  
08.04.2018  12:44:21 datetime now
08.04.2018  I need..
  1. //Adding DataRow  
  2.             foreach (DataGridViewRow row in mp_faktura_listaDataGridView.Rows)  
  3.             {  
  4.   
  5.                 foreach (DataGridViewCell cell in row.Cells)  
  6.                 {  
  7.                     
  8.                     PdfPCell cell2 = new PdfPCell(new Phrase(cell.Value.ToString(), calibri));  
  9.                     
  10.                     pdfTable.AddCell(cell2);  
  11.                 }  
  12.             } 
I try this 
  1. //Adding DataRow  
  2.             foreach (DataGridViewRow row in mp_faktura_listaDataGridView.Rows)  
  3.             {  
  4.   
  5.                 foreach (DataGridViewCell cell in row.Cells)  
  6.                 {  
  7.                    string dateVal = cell.Value.ToString().Split(',')[0];  
  8.                    PdfPCell cell2 = new PdfPCell(new Phrase(dateVal, calibri));  
  9.                     
  10.                 }  
  11.             } 
But dont work

Answers (9)