Insert date to MySQL using VB.net

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I am trying to insert a date into a mysql table but everytime I attempt it
the date field is always empty.

The field is of Date type and the date in code is in European format
dd/mm/yyyy.

Does the date have to be formatted in any particualr way from vb.net.
 
Erm. . . I think you should be in

microsoft.public.dotnet.framework.adonet
 
Here is a link and an excerpt for the date format in MySQL.

http://www.mysql.com/doc/en/Using_DATE.html

The format of a DATE value is 'YYYY-MM-DD'. According to standard SQL, no
other format is allowed. You should use this format in UPDATE expressions
and in the WHERE clause of SELECT statements. For example:

mysql> SELECT * FROM tbl_name WHERE date >= '1997-05-05';
 
Back
Top