mid string

Stimulsoft Reports.NET discussion
Post Reply
ronak
Posts: 5
Joined: Sat Apr 23, 2011 11:14 am

mid string

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

mid string

Post by Alex K. »

Hello,

Please send us your report with sample data for analysis.

Thank you.
ronak
Posts: 5
Joined: Sat Apr 23, 2011 11:14 am

mid string

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

mid string

Post 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.
Post Reply