Skip to content

Do not want to see the time in itextsharp report

Shovan Saha

Asked Jun 2, 2017, 8:05 AM EDTSolved
Share
LinkedInX
C#, visual studio 2015, desktop dataentry application:
I have used the code for iTextSharp and found the output. I do not want to see PaymentDate time like "12.00.00AM". Please help me as sample code or example:
 
C#
//Adding Header row
            foreach (DataGridViewColumn column in dataGridView1.Columns)
            {
                PdfPCell cell = new PdfPCell(new Phrase(column.HeaderText,fontTable));
                pdfTable.AddCell(cell);
            }

         //Adding DataRow

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {

                foreach (DataGridViewCell cell in row.Cells)
                    {

                      pdfTable.AddCell(new PdfPCell(new Phrase(cell.Value.ToString(), fontTable)) { Border = PdfPCell.BOTTOM_BORDER, Padding = 5, MinimumHeight = 30, PaddingTop = 5 });

                    }
            }
 
Output:
 
 I do not want to see PaymentDate time "12.00.00AM". Please help me.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.