Export with DateTimeOffset

Hi,

I’m trying to export a grid (to Excel) with data in DateTimeOffset format.

It doesn’t work and I get the error:

“Error: System.InvalidCastException: Unable to cast object of type 'System.DateTimeOffset' to type 'System.DateTime'.”

What can I do to avoid this error ? Maybe some cast from DateTimeOffset to DateTime ?

You will find an example attached.

Thanks for your help.

Best regards.

Francois


Attachment: DateTimeOffset_export_5f1cd7e1.zip

1 Reply 1 reply marked as answer

VN Vignesh Natarajan Syncfusion Team September 4, 2020 05:35 AM UTC

Hi Francois,   
  
Thanks for contacting Syncfusion support.   
  
Query: “I’m trying to export a grid (to Excel) with data in DateTimeOffset format. It doesn’t work and I get the error”  
     
We have analyzed the reported issue and we are able to reproduce the reported issue at our end too. Since it is a known, we have already confirmed it as a bug and logged the defect report “Problem with exporting when having a DateTimeOffset in Grid”. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our weekly patch release which is expected to be rolled out by mid of September 2020 
     
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.     
     
     
Till then we appreciate your patience.      
   
Regards,   
Vignesh Natarajan  




Marked as answer
Loader.
Up arrow icon