I have a MySQL database with a certain field that contains a date.
How can I convert it to a C# DateTime
object?
And how do I convert a C# Dat
We use MySQL and C# at my shop for a number of applications. The solution that I used for anything to do with dates was to use BIGINT values within the DB and store all my DateTime objects there as UTC values. For my needs this solution worked really well and was straightforward. This avoided any problems between converting to/from different date formats. The DB side is oblivious to the fact that I'm storing dates and the C# clients could easily convert anything from the Int64 to the DateTime.
Anyhow, that was my solution and it worked for me.
Best of luck!