Please help me how to insert LIKE %
in date between. Example is:
SELECT *
FROM table
WHERE Date BETWEEN '" & startDate & "%'" AND '" & endDate & "%'"
So in this code where i should put LIKE
so that data will appear?
example if i set like this
SELECT *
FROM table
WHERE Date LIKE '" & startDate & "%'"
it's working..LIKE
meant read either startdate or %..for starting it will read %
Try this :
"Select (listOfFields)
FROM TABLE
where CONVERT(VARCHAR(25), Your_DATE, 126) BETWEEN 'Start_date%' AND 'EndDate%'";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With