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