I always preffer to use the most standard way to do things, to don't have to
change the code all the time something is changed in a driver or other
----- Original Message -----
From: "Barry Zubel" <barry@stripped>
To: "'Jorge Bastos'" <mysql.jorge@stripped>; <dotnet@stripped>
Sent: Thursday, December 09, 2004 5:30 PM
Subject: RE: datetime
Currently, datetimes are being returned as a MySqlDateTime to allow for
dates like 0000-00-00. To return it as a .Net date/time, you need to convert
using one of the following:
Dataposto.Value = CDate(myrd.Item("postodata").ToString())
Dataposto.Value = Ctype(myrd.Item("postodata"),
Or, for loose binding:
Dataposto.Value = myrd.Item("postodata").GetDateTime
Reggie has asked for comments regarding this behaviour on here, so it may be
subject to change. AT the moment, I believe the safest method is to use
.ToString with a Cdate conversion.
From: Jorge Bastos [mailto:mysql.jorge@stripped]
Sent: 09 December 2004 17:11
In old bytefx i used this sintax
dataposto.Value = myrd.Item("postodata")
Using the new driver, in verstion 1.0.2 i get an exeption as shown below:
Cast from type 'MySqlDateTime' to type 'Date' is not valid.
How to use the new value?