wrong CDate result

  • Thread starter Thread starter js
  • Start date Start date
J

js

Hi, what teh CDate convert myDate to wrong date? Please advice...
Dim myDate As String
myDate = "Jun 13,05"
MsgBox CDate(myDate)
Debug.Print CDate(myDate)
' 2013-6-5
 
js said:
Hi, what teh CDate convert myDate to wrong date? Please advice...
Dim myDate As String
myDate = "Jun 13,05"
MsgBox CDate(myDate)
Debug.Print CDate(myDate)
' 2013-6-5


Works fine on my machine, must have something to do with
your Regional and Language settings in Windows Control
Panel.
 
JS, I have the same date settings as you, and I cannot reproduce this
problem either. Tested in Access 97 or 2003.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

js said:
Thanks what's your settings?
 
Thaks Allen,
So it's not date settings, what's it. Please advice...

Allen Browne said:
JS, I have the same date settings as you, and I cannot reproduce this
problem either. Tested in Access 97 or 2003.
 
It's a bit hard to advise you what causes the problem when I cannot
reproduce the problem here under any version of Access.

Presumably this is an example based on another problem you are experiencing.
If not, you could solve the problem with:
Dim myDate As Date
myDate = #6/13/2005#
 
Back
Top