date issue with VB
am 07.04.2005 16:03:29 von Mark Mchugh
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
__________________________________
Do you Yahoo!?
Yahoo! Personals - Better first dates. More second dates.
http://personals.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 16:12:38 von Mike Hillyer
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
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Personals - Better first dates. More second dates.
> http://personals.yahoo.com
>
>
--
Mike Hillyer, Technical Writer
MySQL AB, www.mysql.com
Office: +1 403-380-6535
Mobile: +1 403-330-0870
MySQL User Conference (Santa Clara CA, 18-21 April 2005)
Early registration until February 28: www.mysqluc.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 16:23:11 von Daniel da Veiga
You have two ways of dealing with this, wich one you'll use depends on
how "available" the server is to you (are you the Administrator?) and
a personal choice on development and portability.
1) You can change the MySQL date format setting a system variable
(wich I don't remember the name, RTFM). This is only an option if you
can change the server settings (privileges needed). This is good
because you won't have to change your code, but it has disvantages.
The way to change this has been discussed here at the list a week ago,
check the archives.
2) You can format your date at runtime and insert the date formatted
in the way MySQL understands it (yyyy--mm--dd) (YourDate =
Format(Date, "yyyy-mm-dd")).
If you choose the first one, you'll get less work to do at the code,
but if your app has to deal with several different MySQL Servers,
you'll have to set each one to understand the new date format. If you
work on the second option, you'll have more code to do, but you'll
ensure that your app won't have to worry about HOW MySQL stores and
shows date formats.
That's it, hope that helps,
On Apr 7, 2005 11:03 AM, Mark Mchugh wrote:
> Hi,
> I am using the following code
> 4
> 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
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Personals - Better first dates. More second dates.
> http://personals.yahoo.com
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=danieldaveiga@gmail.com
>
>
--
Daniel da Veiga
Computer Operator - RS - Brazil
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 16:51:51 von Mark Mchugh
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 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
> >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Personals - Better first dates. More second
> dates.
> > http://personals.yahoo.com
> >
> >
>
> --
> Mike Hillyer, Technical Writer
> MySQL AB, www.mysql.com
> Office: +1 403-380-6535
> Mobile: +1 403-330-0870
>
> MySQL User Conference (Santa Clara CA, 18-21 April
> 2005)
> Early registration until February 28:
> www.mysqluc.com
>
__________________________________
Do you Yahoo!?
Yahoo! Personals - Better first dates. More second dates.
http://personals.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 16:55:57 von Mike Hillyer
I see slashes, not hyphens ;)
YYYY-MM-DD not YYYY/MM/DD
Mike
Mark Mchugh wrote:
> 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 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
>>>
>>>
>>>
>>>
>>>
>>>__________________________________
>>>Do you Yahoo!?
>>>Yahoo! Personals - Better first dates. More second
>>
>>dates.
>>
>>>http://personals.yahoo.com
>>>
>>>
>>
>>--
>>Mike Hillyer, Technical Writer
>>MySQL AB, www.mysql.com
>>Office: +1 403-380-6535
>>Mobile: +1 403-330-0870
>>
>>MySQL User Conference (Santa Clara CA, 18-21 April
>>2005)
>>Early registration until February 28:
>>www.mysqluc.com
>>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Personals - Better first dates. More second dates.
> http://personals.yahoo.com
--
Mike Hillyer, Technical Writer
MySQL AB, www.mysql.com
Office: +1 403-380-6535
Mobile: +1 403-330-0870
MySQL User Conference (Santa Clara CA, 18-21 April 2005)
Early registration until February 28: www.mysqluc.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 17:01:09 von Mark Mchugh
DOH!!!
but even when using hyphens i am geting the same.....
--- Mike Hillyer wrote:
> I see slashes, not hyphens ;)
>
> YYYY-MM-DD not YYYY/MM/DD
>
> Mike
>
>
> Mark Mchugh wrote:
> > 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 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
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>__________________________________
> >>>Do you Yahoo!?
> >>>Yahoo! Personals - Better first dates. More
> second
> >>
> >>dates.
> >>
> >>>http://personals.yahoo.com
> >>>
> >>>
> >>
> >>--
> >>Mike Hillyer, Technical Writer
> >>MySQL AB, www.mysql.com
> >>Office: +1 403-380-6535
> >>Mobile: +1 403-330-0870
> >>
> >>MySQL User Conference (Santa Clara CA, 18-21 April
> >>2005)
> >>Early registration until February 28:
> >>www.mysqluc.com
> >>
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Personals - Better first dates. More second
> dates.
> > http://personals.yahoo.com
>
> --
> Mike Hillyer, Technical Writer
> MySQL AB, www.mysql.com
> Office: +1 403-380-6535
> Mobile: +1 403-330-0870
>
> MySQL User Conference (Santa Clara CA, 18-21 April
> 2005)
> Early registration until February 28:
> www.mysqluc.com
>
__________________________________
Do you Yahoo!?
Yahoo! Personals - Better first dates. More second dates.
http://personals.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 17:16:52 von Mike Hillyer
What does your sqlstring look like now if you grab it from the watch?
Mike
Mark Mchugh wrote:
> DOH!!!
>
> but even when using hyphens i am geting the same.....
>
>
>
> --- Mike Hillyer wrote:
>
>>I see slashes, not hyphens ;)
>>
>>YYYY-MM-DD not YYYY/MM/DD
>>
>>Mike
>>
>>
>>Mark Mchugh wrote:
>>
>>>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 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
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>__________________________________
>>>>>Do you Yahoo!?
>>>>>Yahoo! Personals - Better first dates. More
>>
>>second
>>
>>>>dates.
>>>>
>>>>
>>>>>http://personals.yahoo.com
>>>>>
>>>>>
>>>>
>>>>--
>>>>Mike Hillyer, Technical Writer
>>>>MySQL AB, www.mysql.com
>>>>Office: +1 403-380-6535
>>>>Mobile: +1 403-330-0870
>>>>
>>>>MySQL User Conference (Santa Clara CA, 18-21 April
>>>>2005)
>>>>Early registration until February 28:
>>>>www.mysqluc.com
>>>>
>>>
>>>
>>>
>>>
>>>__________________________________
>>>Do you Yahoo!?
>>>Yahoo! Personals - Better first dates. More second
>>
>>dates.
>>
>>>http://personals.yahoo.com
>>
>>--
>>Mike Hillyer, Technical Writer
>>MySQL AB, www.mysql.com
>>Office: +1 403-380-6535
>>Mobile: +1 403-330-0870
>>
>>MySQL User Conference (Santa Clara CA, 18-21 April
>>2005)
>>Early registration until February 28:
>>www.mysqluc.com
>>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Personals - Better first dates. More second dates.
> http://personals.yahoo.com
>
>
--
Mike Hillyer, Technical Writer
MySQL AB, www.mysql.com
Office: +1 403-380-6535
Mobile: +1 403-330-0870
MySQL User Conference (Santa Clara CA, 18-21 April 2005)
Early registration until February 28: www.mysqluc.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 17:23:40 von Mark Mchugh
hi...
looks like this...from the debug window...
update policies set renewdate = '12/12/2004' where
polnumber = 'GOO001002';
somehow the date gets set to 2012-12-20
very odd?
--- Mike Hillyer wrote:
> What does your sqlstring look like now if you grab
> it from the watch?
>
> Mike
>
>
> Mark Mchugh wrote:
> > DOH!!!
> >
> > but even when using hyphens i am geting the
> same.....
> >
> >
> >
> > --- Mike Hillyer wrote:
> >
> >>I see slashes, not hyphens ;)
> >>
> >>YYYY-MM-DD not YYYY/MM/DD
> >>
> >>Mike
> >>
> >>
> >>Mark Mchugh wrote:
> >>
> >>>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 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
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>__________________________________
> >>>>>Do you Yahoo!?
> >>>>>Yahoo! Personals - Better first dates. More
> >>
> >>second
> >>
> >>>>dates.
> >>>>
> >>>>
> >>>>>http://personals.yahoo.com
> >>>>>
> >>>>>
> >>>>
> >>>>--
> >>>>Mike Hillyer, Technical Writer
> >>>>MySQL AB, www.mysql.com
> >>>>Office: +1 403-380-6535
> >>>>Mobile: +1 403-330-0870
> >>>>
> >>>>MySQL User Conference (Santa Clara CA, 18-21
> April
> >>>>2005)
> >>>>Early registration until February 28:
> >>>>www.mysqluc.com
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>>__________________________________
> >>>Do you Yahoo!?
> >>>Yahoo! Personals - Better first dates. More
> second
> >>
> >>dates.
> >>
> >>>http://personals.yahoo.com
> >>
> >>--
> >>Mike Hillyer, Technical Writer
> >>MySQL AB, www.mysql.com
> >>Office: +1 403-380-6535
> >>Mobile: +1 403-330-0870
> >>
> >>MySQL User Conference (Santa Clara CA, 18-21 April
> >>2005)
> >>Early registration until February 28:
> >>www.mysqluc.com
> >>
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Personals - Better first dates. More second
> dates.
> > http://personals.yahoo.com
> >
> >
>
> --
> Mike Hillyer, Technical Writer
> MySQL AB, www.mysql.com
> Office: +1 403-380-6535
> Mobile: +1 403-330-0870
>
> MySQL User Conference (Santa Clara CA, 18-21 April
> 2005)
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Yahoo! Personals - Better first dates. More second dates.
http://personals.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
RE: date issue with VB
am 07.04.2005 17:24:21 von ml.mysql
> >=20
> > but even when using hyphens i am geting the same.....
Then I guess the question is: what is the problem you are having?
Is it that it displays the date in a different format than you want or
that you can't insert the date you want???
-Kevin
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 17:24:59 von Mike Hillyer
Makr, I am seeing 12/12/2004, which does not look like YYYY-MM-DD. What
is your code?
Mike
Mark Mchugh wrote:
> hi...
> looks like this...from the debug window...
>
> update policies set renewdate = '12/12/2004' where
> polnumber = 'GOO001002';
>
>
> somehow the date gets set to 2012-12-20
>
> very odd?
>
>
>
>
>
> --- Mike Hillyer wrote:
>
>
>>What does your sqlstring look like now if you grab
>>it from the watch?
>>
>>Mike
>>
>>
>>Mark Mchugh wrote:
>>
>>>DOH!!!
>>>
>>>but even when using hyphens i am geting the
>>
>>same.....
>>
>>>
>>>
>>>--- Mike Hillyer wrote:
>>>
>>>
>>>>I see slashes, not hyphens ;)
>>>>
>>>>YYYY-MM-DD not YYYY/MM/DD
>>>>
>>>>Mike
>>>>
>>>>
>>>>Mark Mchugh wrote:
>>>>
>>>>
>>>>>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 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>__________________________________
>>>>>>>Do you Yahoo!?
>>>>>>>Yahoo! Personals - Better first dates. More
>>>>
>>>>second
>>>>
>>>>
>>>>>>dates.
>>>>>>
>>>>>>
>>>>>>
>>>>>>>http://personals.yahoo.com
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>--
>>>>>>Mike Hillyer, Technical Writer
>>>>>>MySQL AB, www.mysql.com
>>>>>>Office: +1 403-380-6535
>>>>>>Mobile: +1 403-330-0870
>>>>>>
>>>>>>MySQL User Conference (Santa Clara CA, 18-21
>>
>>April
>>
>>>>>>2005)
>>>>>>Early registration until February 28:
>>>>>>www.mysqluc.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>__________________________________
>>>>>Do you Yahoo!?
>>>>>Yahoo! Personals - Better first dates. More
>>
>>second
>>
>>>>dates.
>>>>
>>>>
>>>>>http://personals.yahoo.com
>>>>
>>>>--
>>>>Mike Hillyer, Technical Writer
>>>>MySQL AB, www.mysql.com
>>>>Office: +1 403-380-6535
>>>>Mobile: +1 403-330-0870
>>>>
>>>>MySQL User Conference (Santa Clara CA, 18-21 April
>>>>2005)
>>>>Early registration until February 28:
>>>>www.mysqluc.com
>>>>
>>>
>>>
>>>
>>>
>>>__________________________________
>>>Do you Yahoo!?
>>>Yahoo! Personals - Better first dates. More second
>>
>>dates.
>>
>>>http://personals.yahoo.com
>>>
>>>
>>
>>--
>>Mike Hillyer, Technical Writer
>>MySQL AB, www.mysql.com
>>Office: +1 403-380-6535
>>Mobile: +1 403-330-0870
>>
>>MySQL User Conference (Santa Clara CA, 18-21 April
>>2005)
>>
>
> === message truncated ===
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Personals - Better first dates. More second dates.
> http://personals.yahoo.com
--
Mike Hillyer, Technical Writer
MySQL AB, www.mysql.com
Office: +1 403-380-6535
Mobile: +1 403-330-0870
MySQL User Conference (Santa Clara CA, 18-21 April 2005)
Early registration until February 28: www.mysqluc.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 17:26:53 von Mark Mchugh
here's the code....
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 & "';"
Debug.Print sqlstr
connMySQL.Execute sqlstr
--- Mike Hillyer wrote:
> Makr, I am seeing 12/12/2004, which does not look
> like YYYY-MM-DD. What
> is your code?
>
> Mike
>
>
> Mark Mchugh wrote:
> > hi...
> > looks like this...from the debug window...
> >
> > update policies set renewdate = '12/12/2004' where
> > polnumber = 'GOO001002';
> >
> >
> > somehow the date gets set to 2012-12-20
> >
> > very odd?
> >
> >
> >
> >
> >
> > --- Mike Hillyer wrote:
> >
> >
> >>What does your sqlstring look like now if you grab
> >>it from the watch?
> >>
> >>Mike
> >>
> >>
> >>Mark Mchugh wrote:
> >>
> >>>DOH!!!
> >>>
> >>>but even when using hyphens i am geting the
> >>
> >>same.....
> >>
> >>>
> >>>
> >>>--- Mike Hillyer wrote:
> >>>
> >>>
> >>>>I see slashes, not hyphens ;)
> >>>>
> >>>>YYYY-MM-DD not YYYY/MM/DD
> >>>>
> >>>>Mike
> >>>>
> >>>>
> >>>>Mark Mchugh wrote:
> >>>>
> >>>>
> >>>>>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 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
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>__________________________________
> >>>>>>>Do you Yahoo!?
> >>>>>>>Yahoo! Personals - Better first dates. More
> >>>>
> >>>>second
> >>>>
> >>>>
> >>>>>>dates.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>http://personals.yahoo.com
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>--
> >>>>>>Mike Hillyer, Technical Writer
> >>>>>>MySQL AB, www.mysql.com
> >>>>>>Office: +1 403-380-6535
> >>>>>>Mobile: +1 403-330-0870
> >>>>>>
> >>>>>>MySQL User Conference (Santa Clara CA, 18-21
> >>
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Yahoo! Personals - Better first dates. More second dates.
http://personals.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
RE: date issue with VB
am 07.04.2005 17:27:29 von ml.mysql
> I am using the following code
> rendate =3D Format(rendate, "dd/mm/yyyy")
You must insert dates in this format: YYYY-MM-DD
Eg. 2005-04-07 not 04/07/2005
-Kevin
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
RE: date issue with VB
am 07.04.2005 17:28:32 von ml.mysql
>=20
> here's the code....
>=20
> sqlstr =3D "update policies set renewdate =3D '" & rendate
Change the above line to:
sqlstr =3D "update policies set renewdate =3D '" &
Format(rendate,"YYYY-MM-DD") & "'"
-Kevin
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
RE: date issue with VB
am 07.04.2005 17:38:55 von Mark Mchugh
Perfect, that has solved my problem, thats for all the
help guys
--- "PF: MySQL" wrote:
> >
> > here's the code....
> >
> > sqlstr = "update policies set renewdate = '" &
> rendate
>
> Change the above line to:
>
> sqlstr = "update policies set renewdate = '" &
> Format(rendate,"YYYY-MM-DD") & "'"
>
> -Kevin
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:
>
http://lists.mysql.com/win32?unsub=mark_mch@yahoo.com
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 17:46:34 von Mike Hillyer
Very odd, your debug value does not seem consistent with the format you
do in code. Try a debug.print of rendate after you do the format, also
try creating a new formatteddate = format....
Mike
Mark Mchugh wrote:
> here's the code....
>
>
> 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 & "';"
> Debug.Print sqlstr
> connMySQL.Execute sqlstr
>
>
>
> --- Mike Hillyer wrote:
>
>
>>Makr, I am seeing 12/12/2004, which does not look
>>like YYYY-MM-DD. What
>>is your code?
>>
>>Mike
>>
>>
>>Mark Mchugh wrote:
>>
>>>hi...
>>>looks like this...from the debug window...
>>>
>>>update policies set renewdate = '12/12/2004' where
>>>polnumber = 'GOO001002';
>>>
>>>
>>>somehow the date gets set to 2012-12-20
>>>
>>>very odd?
>>>
>>>
>>>
>>>
>>>
>>>--- Mike Hillyer wrote:
>>>
>>>
>>>
>>>>What does your sqlstring look like now if you grab
>>>>it from the watch?
>>>>
>>>>Mike
>>>>
>>>>
>>>>Mark Mchugh wrote:
>>>>
>>>>
>>>>>DOH!!!
>>>>>
>>>>>but even when using hyphens i am geting the
>>>>
>>>>same.....
>>>>
>>>>
>>>>>
>>>>>--- Mike Hillyer wrote:
>>>>>
>>>>>
>>>>>
>>>>>>I see slashes, not hyphens ;)
>>>>>>
>>>>>>YYYY-MM-DD not YYYY/MM/DD
>>>>>>
>>>>>>Mike
>>>>>>
>>>>>>
>>>>>>Mark Mchugh wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>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 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
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>__________________________________
>>>>>>>>>Do you Yahoo!?
>>>>>>>>>Yahoo! Personals - Better first dates. More
>>>>>>
>>>>>>second
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>dates.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>http://personals.yahoo.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>--
>>>>>>>>Mike Hillyer, Technical Writer
>>>>>>>>MySQL AB, www.mysql.com
>>>>>>>>Office: +1 403-380-6535
>>>>>>>>Mobile: +1 403-330-0870
>>>>>>>>
>>>>>>>>MySQL User Conference (Santa Clara CA, 18-21
>>>>
> === message truncated ===
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Personals - Better first dates. More second dates.
> http://personals.yahoo.com
--
Mike Hillyer, Technical Writer
MySQL AB, www.mysql.com
Office: +1 403-380-6535
Mobile: +1 403-330-0870
MySQL User Conference (Santa Clara CA, 18-21 April 2005)
Early registration until February 28: www.mysqluc.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
RE: date issue with VB
am 07.04.2005 17:49:43 von ml.mysql
>=20
> Perfect, that has solved my problem, thats for all the
> help guys
>=20
Just remember that VB returns date values in variables in the format
that match your regional settings in the windows control panel.
Always format your date values in SQL excute statements with
FORMAT(x,"yyyy-mm-dd") or you will have problems.
-Kevin
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 17:54:12 von Mark Mchugh
yes Mike, its odd alright, must be a bug in VB
--- Mike Hillyer wrote:
> Very odd, your debug value does not seem consistent
> with the format you
> do in code. Try a debug.print of rendate after you
> do the format, also
> try creating a new formatteddate = format....
>
> Mike
>
>
> Mark Mchugh wrote:
> > here's the code....
> >
> >
> > 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 & "';"
> > Debug.Print sqlstr
> > connMySQL.Execute sqlstr
> >
> >
> >
> > --- Mike Hillyer wrote:
> >
> >
> >>Makr, I am seeing 12/12/2004, which does not look
> >>like YYYY-MM-DD. What
> >>is your code?
> >>
> >>Mike
> >>
> >>
> >>Mark Mchugh wrote:
> >>
> >>>hi...
> >>>looks like this...from the debug window...
> >>>
> >>>update policies set renewdate = '12/12/2004'
> where
> >>>polnumber = 'GOO001002';
> >>>
> >>>
> >>>somehow the date gets set to 2012-12-20
> >>>
> >>>very odd?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>--- Mike Hillyer wrote:
> >>>
> >>>
> >>>
> >>>>What does your sqlstring look like now if you
> grab
> >>>>it from the watch?
> >>>>
> >>>>Mike
> >>>>
> >>>>
> >>>>Mark Mchugh wrote:
> >>>>
> >>>>
> >>>>>DOH!!!
> >>>>>
> >>>>>but even when using hyphens i am geting the
> >>>>
> >>>>same.....
> >>>>
> >>>>
> >>>>>
> >>>>>--- Mike Hillyer wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>>I see slashes, not hyphens ;)
> >>>>>>
> >>>>>>YYYY-MM-DD not YYYY/MM/DD
> >>>>>>
> >>>>>>Mike
> >>>>>>
> >>>>>>
> >>>>>>Mark Mchugh wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>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 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
> >>>>
>
=== message truncated ===
__________________________________
Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun.
http://www.advision.webevents.yahoo.com/emoticontest
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 17:55:57 von Mike Hillyer
Maybe try the earlier suggestion to concatenate the format right into
the string.
Mike
Mark Mchugh wrote:
> yes Mike, its odd alright, must be a bug in VB
>
>
>
> --- Mike Hillyer wrote:
>
>
>>Very odd, your debug value does not seem consistent
>>with the format you
>>do in code. Try a debug.print of rendate after you
>>do the format, also
>>try creating a new formatteddate = format....
>>
>>Mike
>>
>>
>>Mark Mchugh wrote:
>>
>>>here's the code....
>>>
>>>
>>>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 & "';"
>>>Debug.Print sqlstr
>>> connMySQL.Execute sqlstr
>>>
>>>
>>>
>>>--- Mike Hillyer wrote:
>>>
>>>
>>>
>>>>Makr, I am seeing 12/12/2004, which does not look
>>>>like YYYY-MM-DD. What
>>>>is your code?
>>>>
>>>>Mike
>>>>
>>>>
>>>>Mark Mchugh wrote:
>>>>
>>>>
>>>>>hi...
>>>>>looks like this...from the debug window...
>>>>>
>>>>>update policies set renewdate = '12/12/2004'
>>
>>where
>>
>>>>>polnumber = 'GOO001002';
>>>>>
>>>>>
>>>>>somehow the date gets set to 2012-12-20
>>>>>
>>>>>very odd?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>--- Mike Hillyer wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>What does your sqlstring look like now if you
>>
>>grab
>>
>>>>>>it from the watch?
>>>>>>
>>>>>>Mike
>>>>>>
>>>>>>
>>>>>>Mark Mchugh wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>DOH!!!
>>>>>>>
>>>>>>>but even when using hyphens i am geting the
>>>>>>
>>>>>>same.....
>>>>>>
>>>>>>
>>>>>>
>>>>>>>--- Mike Hillyer wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>I see slashes, not hyphens ;)
>>>>>>>>
>>>>>>>>YYYY-MM-DD not YYYY/MM/DD
>>>>>>>>
>>>>>>>>Mike
>>>>>>>>
>>>>>>>>
>>>>>>>>Mark Mchugh wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>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 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
>>
> === message truncated ===
>
>
>
>
> __________________________________
> Yahoo! Messenger
> Show us what our next emoticon should look like. Join the fun.
> http://www.advision.webevents.yahoo.com/emoticontest
>
--
Mike Hillyer, Technical Writer
MySQL AB, www.mysql.com
Office: +1 403-380-6535
Mobile: +1 403-330-0870
MySQL User Conference (Santa Clara CA, 18-21 April 2005)
Early registration until February 28: www.mysqluc.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: date issue with VB
am 07.04.2005 18:15:41 von Mark Mchugh
yes, that works, seems a bit strange!!!
--- Mike Hillyer wrote:
> Maybe try the earlier suggestion to concatenate the
> format right into
> the string.
>
> Mike
>
>
> Mark Mchugh wrote:
> > yes Mike, its odd alright, must be a bug in VB
> >
> >
> >
> > --- Mike Hillyer wrote:
> >
> >
> >>Very odd, your debug value does not seem
> consistent
> >>with the format you
> >>do in code. Try a debug.print of rendate after you
> >>do the format, also
> >>try creating a new formatteddate = format....
> >>
> >>Mike
> >>
> >>
> >>Mark Mchugh wrote:
> >>
> >>>here's the code....
> >>>
> >>>
> >>>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 & "';"
> >>>Debug.Print sqlstr
> >>> connMySQL.Execute sqlstr
> >>>
> >>>
> >>>
> >>>--- Mike Hillyer wrote:
> >>>
> >>>
> >>>
> >>>>Makr, I am seeing 12/12/2004, which does not
> look
> >>>>like YYYY-MM-DD. What
> >>>>is your code?
> >>>>
> >>>>Mike
> >>>>
> >>>>
> >>>>Mark Mchugh wrote:
> >>>>
> >>>>
> >>>>>hi...
> >>>>>looks like this...from the debug window...
> >>>>>
> >>>>>update policies set renewdate = '12/12/2004'
> >>
> >>where
> >>
> >>>>>polnumber = 'GOO001002';
> >>>>>
> >>>>>
> >>>>>somehow the date gets set to 2012-12-20
> >>>>>
> >>>>>very odd?
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>--- Mike Hillyer wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>What does your sqlstring look like now if you
> >>
> >>grab
> >>
> >>>>>>it from the watch?
> >>>>>>
> >>>>>>Mike
> >>>>>>
> >>>>>>
> >>>>>>Mark Mchugh wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>DOH!!!
> >>>>>>>
> >>>>>>>but even when using hyphens i am geting the
> >>>>>>
> >>>>>>same.....
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>--- Mike Hillyer wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>I see slashes, not hyphens ;)
> >>>>>>>>
> >>>>>>>>YYYY-MM-DD not YYYY/MM/DD
> >>>>>>>>
> >>>>>>>>Mike
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>Mark Mchugh wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>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
> wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>MySQL's date format is yyyy-mm-dd and you
> >>
> >>will
> >>
> >>>>>>>>need
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>>to format your date
> >>>>>>>>>>the same way.
> >>>>>>>>>>
> >>>>>>>>>>Mike Hillyer
>
=== message truncated ===
__________________________________
Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun.
http://www.advision.webevents.yahoo.com/emoticontest
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
RE: date issue with VB
am 07.04.2005 20:12:58 von ml.mysql
> > Very odd, your debug value does not seem consistent
> > with the format you=20
> > do in code. Try a debug.print of rendate after you
> > do the format, also=20
> > try creating a new formatteddate =3D format....
>=20
> yes Mike, its odd alright, must be a bug in VB
>=20
It's not a bug. It's by design.
VB stores dates as a "date" data type not as a string. It does not
matter how you format the date when you apply the value to a date data
type, VB will store it as it's own internal representation. The date
format that VB will display is determined by the local user's windows
regional settings.
In order to have predictable results with dates, you must always format
them the way you want them to be. With MySQL that is yyyy-mm-dd. =20
-Kevin
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
RE: date issue with VB
am 08.04.2005 00:51:42 von jbonnett
It might depend on how rendate has been declared. It should be a string,
but if it's declared as a date, it will effectively throw away the
formatting and do it again (to a default format) when you concatenate it
into the SQL string. This may be what is happening.
Sometimes I wish VB did not try to be so helpful, converting types
without asking!
John Bonnett
-----Original Message-----
From: Mike Hillyer [mailto:mhillyer@mysql.com]=20
Sent: Friday, 8 April 2005 1:17 AM
To: Mark Mchugh
Cc: mysql list
Subject: Re: date issue with VB
Very odd, your debug value does not seem consistent with the format you=20
do in code. Try a debug.print of rendate after you do the format, also=20
try creating a new formatteddate =3D format....
Mike
Mark Mchugh wrote:
> here's the code....
>=20
>=20
> rendate =3D objWorksheet.Cells(x, 4).Value
> rendate =3D Format(rendate, "yyyy-mm-dd")
>=20
> sqlstr =3D "update policies set renewdate =3D '" & rendate
> & "' where polnumber =3D '" & objWorksheet.Cells(x,
> 1).Value & "';"
> Debug.Print sqlstr
> connMySQL.Execute sqlstr
>=20
>=20
>=20
> --- Mike Hillyer wrote:
>=20
>=20
>>Makr, I am seeing 12/12/2004, which does not look
>>like YYYY-MM-DD. What=20
>>is your code?
>>
>>Mike
>>
>>
>>Mark Mchugh wrote:
>>
>>>hi...
>>>looks like this...from the debug window...
>>>
>>>update policies set renewdate =3D '12/12/2004' where
>>>polnumber =3D 'GOO001002';
>>>
>>>
>>>somehow the date gets set to 2012-12-20
>>>
>>>very odd?
>>>
>>>
>>>
>>>
>>>
>>>--- Mike Hillyer wrote:
>>>
>>>
>>>
>>>>What does your sqlstring look like now if you grab
>>>>it from the watch?
>>>>
>>>>Mike
>>>>
>>>>
>>>>Mark Mchugh wrote:
>>>>
>>>>
>>>>>DOH!!!=20
>>>>>
>>>>>but even when using hyphens i am geting the
>>>>
>>>>same.....
>>>>
>>>>
>>>>>
>>>>>--- Mike Hillyer wrote:
>>>>>
>>>>>
>>>>>
>>>>>>I see slashes, not hyphens ;)
>>>>>>
>>>>>>YYYY-MM-DD not YYYY/MM/DD
>>>>>>
>>>>>>Mike
>>>>>>
>>>>>>
>>>>>>Mark Mchugh wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Thanks Mike,
>>>>>>>I have changed my code to this
>>>>>>>
>>>>>>>For x =3D 1 To 485
>>>>>>>Debug.Print objWorksheet.Cells(x, 4).Value
>>>>>>>rendate =3D objWorksheet.Cells(x, 4).Value
>>>>>>>rendate =3D Format(rendate, "yyyy/MM/dd")
>>>>>>>
>>>>>>>sqlstr =3D "update policies set renewdate =3D " &
>>>>>>
>>>>>>rendate
>>>>>>
>>>>>>
>>>>>>
>>>>>>>& " where polnumber =3D '" &
>>
>>objWorksheet.Cells(x,
>>
>>>>>>>1).Value & "';"
>>>>>>>
>>>>>>>' connMySQL.Execute sqlstr
>>>>>>> rs.ActiveConnection =3D 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 wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>MySQL's date format is yyyy-mm-dd and you will
>>>>>>
>>>>>>need
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>to format your date=20
>>>>>>>>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 =3D 1 To 485
>>>>>>>>>Debug.Print objWorksheet.Cells(x, 4).Value
>>>>>>>>>rendate =3D objWorksheet.Cells(x, 4).Value
>>>>>>>>>rendate =3D Format(rendate, "dd/mm/yyyy")
>>>>>>>>>sqlstr =3D "update policies set renewdate =3D " &
>>>>>>>>
>>>>>>>>rendate
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>& " where polnumber =3D '" &
>>>>
>>>>objWorksheet.Cells(x,
>>>>
>>>>
>>>>>>>>>1).Value & "';"
>>>>>>>>>=20
>>>>>>>>>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
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> =09
>>>>>>>>>__________________________________=20
>>>>>>>>>Do you Yahoo!?=20
>>>>>>>>>Yahoo! Personals - Better first dates. More
>>>>>>
>>>>>>second
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>dates.=20
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>http://personals.yahoo.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>--=20
>>>>>>>>Mike Hillyer, Technical Writer
>>>>>>>>MySQL AB, www.mysql.com
>>>>>>>>Office: +1 403-380-6535
>>>>>>>>Mobile: +1 403-330-0870
>>>>>>>>
>>>>>>>>MySQL User Conference (Santa Clara CA, 18-21
>>>>
> ===3D message truncated ===3D
>=20
>=20
>=20
> =09
> __________________________________=20
> Do you Yahoo!?=20
> Yahoo! Personals - Better first dates. More second dates.=20
> http://personals.yahoo.com
--=20
Mike Hillyer, Technical Writer
MySQL AB, www.mysql.com
Office: +1 403-380-6535
Mobile: +1 403-330-0870
MySQL User Conference (Santa Clara CA, 18-21 April 2005)
Early registration until February 28: www.mysqluc.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
Re: date issue with VB
am 08.04.2005 09:10:35 von Christian Surya
VB recognize mm as minute. If you want set with month you must use MM (capital)
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
RE: date issue with VB
am 08.04.2005 15:45:43 von ml.mysql
All the documentation I have for VB6 states that the format string is
not case sensitive and the "m" or "M" is used for months and "n" or "N"
is used for minutes.
Maybe VB.NET handles this differently than earlier VB?
-Kevin=20
> -----Original Message-----
> From: Christian Surya [mailto:csuryas@gmail.com]=20
> Posted At: Friday, April 08, 2005 12:11 AM
> Posted To: MySQL
> Conversation: date issue with VB
> Subject: Re: date issue with VB
> Importance: Low
>=20
>=20
> VB recognize mm as minute. If you want set with month you=20
> must use MM (capital)
>=20
> --=20
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: =20
> http://lists.mysql.com/win32?unsub=3Dml.mysql@in-genius.com
>=20
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
RE: date issue with VB
am 08.04.2005 16:06:01 von Mark Mchugh
i've never come accross any case sensivity in windows
either
--- "PF: MySQL" wrote:
>
> All the documentation I have for VB6 states that the
> format string is
> not case sensitive and the "m" or "M" is used for
> months and "n" or "N"
> is used for minutes.
>
> Maybe VB.NET handles this differently than earlier
> VB?
>
> -Kevin
>
> > -----Original Message-----
> > From: Christian Surya [mailto:csuryas@gmail.com]
> > Posted At: Friday, April 08, 2005 12:11 AM
> > Posted To: MySQL
> > Conversation: date issue with VB
> > Subject: Re: date issue with VB
> > Importance: Low
> >
> >
> > VB recognize mm as minute. If you want set with
> month you
> > must use MM (capital)
> >
> > --
> > MySQL Windows Mailing List
> > For list archives: http://lists.mysql.com/win32
> > To unsubscribe:
> >
>
http://lists.mysql.com/win32?unsub=ml.mysql@in-genius.com
> >
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:
>
http://lists.mysql.com/win32?unsub=mark_mch@yahoo.com
>
>
__________________________________
Do you Yahoo!?
Yahoo! Personals - Better first dates. More second dates.
http://personals.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
RE: date issue with VB
am 11.04.2005 00:33:52 von jbonnett
My VB recognises "nn" as minutes "mm" as months.
-----Original Message-----
From: Christian Surya [mailto:csuryas@gmail.com]=20
Sent: Friday, 8 April 2005 4:41 PM
To: win32@lists.mysql.com
Subject: Re: date issue with VB
VB recognize mm as minute. If you want set with month you must use MM
(capital)
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org