Goran Bibic

Goran Bibic

  • 479
  • 2.9k
  • 197.9k

Itext sharp date time 16.04.2020 00:00:00

Apr 16 2020 11:06 AM
Itext sharp date time With my code result is 16.04.2020
That is ok...
If I have 2 date in table...i cant solve
Second date is 16.04.2020 00:00:00
Thank you
 
  1. //Adding DataRow  
  2.             foreach (DataGridViewRow row in ListDataGridView.Rows)  
  3.             {  
  4.                 int c = 0;  
  5.                 foreach (DataGridViewCell cell in row.Cells)  
  6.                 {  
  7.                     if (c == 2)  
  8.                     {  
  9.                         PdfPCell cell2 = new PdfPCell(new Phrase(cell.Value.ToString().Split(' ')[0], calibri));  
  10.                         pdfTable.AddCell(cell2);  
  11.                     }  
  12.                     else  
  13.                     {  
  14.                         PdfPCell cell2 = new PdfPCell(new Phrase(cell.Value.ToString(), calibri));  
  15.                     cell2.HorizontalAlignment = Element.ALIGN_RIGHT;  
  16.                     cell2.VerticalAlignment = Element.ALIGN_CENTER;  
  17.                     pdfTable.AddCell(cell2);  
  18.                     }  
  19.                     c++;  
  20.                 }  
  21.             }  

Answers (1)