Insert date to MySQL using VB.net

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.
 
O

One Handed Man [ OHM ]

Erm. . . I think you should be in

microsoft.public.dotnet.framework.adonet
 
S

Scott

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';
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top