A Alejandro Penate-Diaz Mar 11, 2005 #1 how can I convert a string like this "10/04" meaning octuber/2004 to a valid DateTime?
G Guest Mar 11, 2005 #2 Alejandro Penate-Diaz said: how can I convert a string like this "10/04" meaning octuber/2004 to a valid DateTime? Click to expand... CDate function: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctcdate.asp Check the parameters that CDate is expecting. You may need to do some text parsing and string manipulation before calling CDate.
Alejandro Penate-Diaz said: how can I convert a string like this "10/04" meaning octuber/2004 to a valid DateTime? Click to expand... CDate function: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctcdate.asp Check the parameters that CDate is expecting. You may need to do some text parsing and string manipulation before calling CDate.
W William F. Robertson, Jr. Mar 11, 2005 #3 You will use the .ParseExact method of DateTime. Dim dt as DateTime dt = DateTime.Parse( "10/04", "MM/yy" ) DateTime dtC = DateTime.Parse( "10/04", "MM/yy" ); HTH, bill
You will use the .ParseExact method of DateTime. Dim dt as DateTime dt = DateTime.Parse( "10/04", "MM/yy" ) DateTime dtC = DateTime.Parse( "10/04", "MM/yy" ); HTH, bill