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
- //Adding DataRow
- foreach (DataGridViewRow row in ListDataGridView.Rows)
- {
- int c = 0;
- foreach (DataGridViewCell cell in row.Cells)
- {
- if (c == 2)
- {
- PdfPCell cell2 = new PdfPCell(new Phrase(cell.Value.ToString().Split(' ')[0], calibri));
- pdfTable.AddCell(cell2);
- }
- else
- {
- PdfPCell cell2 = new PdfPCell(new Phrase(cell.Value.ToString(), calibri));
- cell2.HorizontalAlignment = Element.ALIGN_RIGHT;
- cell2.VerticalAlignment = Element.ALIGN_CENTER;
- pdfTable.AddCell(cell2);
- }
- c++;
- }
- }