Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot perform '>=' operation on System.String and Syste
Message
 
 
To
10/11/2005 17:15:55
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01067413
Message ID:
01067471
Views:
9
>>I've recompiled an existing .NET 1.1 application with VS.NET 2005 on .NET 2.0. No compile errors, but at run time I get
>>
>>
>>Cannot perform '>=' operation on System.String and System.DateTime
>>The line of code referenced is
>>dtNews.DefaultView.RowFilter = "NewsDate >= #" + DateTime.Today.ToString() + "#";
>>
>The first thing that comes to mind is that the implicit type conversion options are set differently. Check Option Strict in the 2005 project versus 2003. You can also set Option Strict at the top of the source code file.

I got it. I put single quotes in place of the #, since the newsdate field is a string and not a date. Sorry to waste your time.
Previous
Reply
Map
View

Click here to load this message in the networking platform