Problem with Project Migrating from .net 1.1 to .net 2.0


Hi
i am working in .net 1.1 and i am working on a web service. it 's working fine in .net 1.1 with vs2003 but when i migrated my WS from .net 1.1 to .net 2.0 i am getting System.FormatException while converting datetime from string using DateTime.Parse method. it was not happening earlier when i was using .net 1.1. My WS converted from vs2003 to vs2005 using a wizard and it doesn's shows a single error.
i did lots of googling on this issue but didnot gets any help ,
so any reply in the matter will be highly appericiable.
 thanks
vishal sharma
0
vishalsharma
2/13/2007 11:21:36 AM
📁 asp.net.migrate-vs2003-vs2005
📃 590 articles.
⭐ 0 followers.

💬 1 Replies
👁️‍🗨️ 1475 Views



What format was your String in when you are trying to convert it?  I.e., "3/12/2007", "March 12, 2007", "3/12/2007 1:45:02 PM".
As a quick workaround, try
Dim myDate As DateTime
Dim myString As String

myString = "3/12/2007"

' Try:
myDate = cdate(myString)

' or try:
myDate = DirectCast(myString, DateTime)
 And see if those work.

---------------------------------------
MCP - Web Based Client Development .NET 2.0
0
ps2goat
2/13/2007 3:09:52 PM
Reply: