MySqlDateTime to System.DateTime conversion
Posted
by bowsa
on Stack Overflow
See other posts from Stack Overflow
or by bowsa
Published on 2010-04-28T12:12:52Z
Indexed on
2010/04/28
12:33 UTC
Read the original article
Hit count: 501
Ok I'm very new to databases and C# in general, but I'm using a piece of code that exports dataset data to an Excel file, and its taking issue with the date/time format. I'm using the MySQL connector so the rowtype is MySql.Data.Types.MySqlDateTime. Is there any quick way to convert it into System.DateTime so I can slot it straight into the case statement?
Here's a link to the code I used, I copied it verbatim so I've not copied and pasted it here. It throws a MySql.Data.Types.MySqlDateTime not handled exception: Code Project Thanks in advance for any help.
© Stack Overflow or respective owner