25 messages in com.mysql.lists.win32Re: date issue with VB
FromSent OnAttachments
Mark Mchugh07 Apr 2005 07:03 
Mike Hillyer07 Apr 2005 07:12 
Daniel da Veiga07 Apr 2005 07:22 
Mark Mchugh07 Apr 2005 07:51 
Mike Hillyer07 Apr 2005 07:55 
Mark Mchugh07 Apr 2005 08:00 
Mike Hillyer07 Apr 2005 08:16 
Mark Mchugh07 Apr 2005 08:23 
PF: MySQL07 Apr 2005 08:23 
Mike Hillyer07 Apr 2005 08:24 
Mark Mchugh07 Apr 2005 08:26 
PF: MySQL07 Apr 2005 08:27 
PF: MySQL07 Apr 2005 08:28 
Mark Mchugh07 Apr 2005 08:38 
Mike Hillyer07 Apr 2005 08:46 
PF: MySQL07 Apr 2005 08:49 
Mark Mchugh07 Apr 2005 08:53 
Mike Hillyer07 Apr 2005 08:55 
Mark Mchugh07 Apr 2005 09:15 
PF: MySQL07 Apr 2005 11:12 
jbon...@sola.com.au07 Apr 2005 15:51 
Christian Surya08 Apr 2005 00:10 
PF: MySQL08 Apr 2005 06:45 
Mark Mchugh08 Apr 2005 07:05 
jbon...@sola.com.au10 Apr 2005 15:33 
Subject:Re: date issue with VB
From:Mark Mchugh (mark@yahoo.com)
Date:04/07/2005 07:51:29 AM
List:com.mysql.lists.win32

Thanks Mike, I have changed my code to this

For x = 1 To 485 Debug.Print objWorksheet.Cells(x, 4).Value rendate = objWorksheet.Cells(x, 4).Value rendate = Format(rendate, "yyyy/MM/dd")

sqlstr = "update policies set renewdate = " & rendate & " where polnumber = '" & objWorksheet.Cells(x, 1).Value & "';"

' connMySQL.Execute sqlstr rs.ActiveConnection = connMySQL rs.Open sqlstr, connMySQL, adOpenKeyset, adLockOptimistic

Next

i'm still having the same issue, when i do the following on the server

show variables like '%date%';

i dont get any values for a date format, is it possible the the server does not know about the date format?

thanks

Mark

--- Mike Hillyer <mhil@mysql.com> wrote:

MySQL's date format is yyyy-mm-dd and you will need to format your date the same way.

Mike Hillyer

Mark Mchugh wrote:

Hi, I am using the following code

Dim sqlstr As String Dim rendate As Date

Dim x As Integer For x = 1 To 485 Debug.Print objWorksheet.Cells(x, 4).Value rendate = objWorksheet.Cells(x, 4).Value rendate = Format(rendate, "dd/mm/yyyy") sqlstr = "update policies set renewdate = " & rendate & " where polnumber = '" & objWorksheet.Cells(x, 1).Value & "';"

connMySQL.Execute sqlstr

Next

and for the firs date in my list, its 1st of feb 2005, which i call 01/02/2005, but whe i input this into mysql, through the control center i see the date 2000-00-01, can anybody help? this is the default european date format.....

thanks

MySQL User Conference (Santa Clara CA, 18-21 April 2005) Early registration until February 28: www.mysqluc.com