Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CDate Problem
Hello! I have a problem converting string to date. Working with Excel 2003, function Cdate works fine. If I do ..Range(myCell).Value = CDate("22/02/2005") in the cell is shown 22/02/2005 (My regional configuration is dd/mm/yyyy). But if I use this program with Excel XP, the function doesn't work correctly because it tries to make a date which is the day 2 of the month 22. I've tried to do MiDate = CDate(#2/22/2005#) but it doesn't work. The solution in office XP is: ..Range(myCell).NumberFormat = "dd/mm/yyyy" ..Range(myCell).Value = "22/02/2005" But this solution doesn't work in Excel 2003!!! The problem is that I need a solution working for both versions. Is it possible to know the version of Excel? Can anyone help me please??? Thank-you!!! -- sil0000 ------------------------------------------------------------------------ sil0000's Profile: http://www.excelforum.com/member.php...o&userid=25460 View this thread: http://www.excelforum.com/showthread...hreadid=389020 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CDate and IsDate | Excel Programming | |||
CDATE issues | Excel Programming | |||
CDate cannot coerce value of IsDate(true)? | Excel Programming | |||
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? | Excel Programming | |||
What is the differance between cdate and ... | Excel Programming |