dbTalk Databases Forums  

date problem...

mailing.database.mysql-win32 mailing.database.mysql-win32


Discuss date problem... in the mailing.database.mysql-win32 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark Mchugh
 
Posts: n/a

Default date problem... - 10-28-2003 , 06:49 AM






Hi,
I am trying to add a date to mysql, and i am having a
problem.. its seems to add the date fine, but when i
check the table the date is incorrect. here's the
code....

dim tmpdate as date

sqlstr " insert in tb1(date_c) values("'" & tmpdate
&"'"

set rs = new adodb.recordset
rs.activeconnection = connmysql
rs.open sqlstr


a record is added, buth when i view the table, all i
can see is the following has been added each time

20/10/2028 03:00:00


any ideas?

thanks


__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=m...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Petr Vileta
 
Posts: n/a

Default Re: date problem... - 10-28-2003 , 06:34 PM






Quote:
I am trying to add a date to mysql, and i am having a
problem.. its seems to add the date fine, but when i
check the table the date is incorrect. here's the
code....
In mysql the date is all time in YYYY-MM-DD or YYYYMMDD format. You must
insert date using this format. If you are using other date format in your
country (like DD.MM.YYYY in Czech or German), you must convert date in your
code first.

Petr Vileta, Czech republic



--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=m...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.