Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with filtering data..

Status
Not open for further replies.

RocAFella2007

Technical User
Mar 21, 2007
45
GB
Hi, could somebody possibly help me out on some data filtering please. It keeps breaking on the following line:

dvfilter.RowFilter = String.Format("DateBorrowed LIKE '{0}*' ", _
txtenterdetails.Text)

with the error of:

Additional information: Cannot perform 'Like' operation on System.DateTime and System.String.

Any suggestions welcome. Thanks
 
Cannot perform 'Like' operation ...

I guess that you want to match 7/4/2007 with 7/4/* for example. This is not possible, as the one is date and the other is string. Use the >, >= orerators instead of LIKE. Also, i think that the date should be between #..#
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top