c# - MySqlDateTime to System.DateTime conversion -
ok i'm new databases , c# in general, i'm using piece of code exports dataset data excel file, , taking issue date/time format. i'm using mysql connector rowtype mysql.data.types.mysqldatetime. there quick way convert system.datetime can slot straight case statement?
here's link code used, copied verbatim i've not copied , pasted here. throws mysql.data.types.mysqldatetime not handled exception: code project in advance help.
what do, format output in query c# date time format, , parse reults:
mysql command
select date_format(now(), '%y-%m-%d %t') 'date';
c#
datetime x; datetime.tryparse(results["date"], out x);
if need more explanation comment , ask :)
update comment presuming appdate column date one:
select appref, date_format(appdate, '%y-%m-%d %t') 'appdate' applications id > 810000
Comments
Post a Comment