EXPORT TO PDF DATE FIELD

Hi,

In my Grid Data, one field has only Date format {DD/MM/YYYY}, but while exporting to PDF the said field is showing with time.
It is showing 05/08/2018 12:00:00AM , Where I want as 05/08/2018 only.

How to setup Date type fields as DD/MM/YYYY format only while exporting to pdf ?






1 Reply

AA Arulraj A Syncfusion Team August 27, 2018 11:23 AM UTC

Hi Deepak, 

Thanks for contacting Syncfusion support. 

To export the SfDataGid to PDF document with the same format as displayed in the view, the PdfExportingOptions.ExportFormat property should be set to true. Please refer to the following code example and sample. 

Code Example: 
PdfExportingOptions options = new PdfExportingOptions(); 
options.ExportFormat = true; 
var document = sfDataGrid1.ExportToPdf(options); 


 
Arulraj A 


Loader.
Up arrow icon