Page 1 of 1

mid string

Posted: Sat Apr 23, 2011 11:22 am
by ronak
select * from boiler where date like @date
hi i have this code in my datasource and now my date is string value i want to filter my datasource like this code

select * from boiler where mid(date,1,4) like @date
i want 4 string in first of date string
thanks

mid string

Posted: Mon Apr 25, 2011 1:26 am
by Alex K.
Hello,

Please send us your report with sample data for analysis.

Thank you.

mid string

Posted: Tue Apr 26, 2011 3:55 pm
by ronak
hi look my friend
i have a datasource that contain this text in query text
select * from boiler where date like @date
my format of date is string now i want to pick up 4 character of begin of date
i write my question in vb.net language
select * from boiler where mid(date,1,4) like @date
thanks

mid string

Posted: Wed Apr 27, 2011 3:31 am
by Alex K.
Hello,

Please try to use the following query in your data source:

Code: Select all

select * from boiler where substring(convert(varchar(10),date),1,4) like @date
Thank you.