Im using vb.net code with Sql Server 2008 R2.
I'm trying to get result by using a SQL query to get all rows that have a value between 2 dates:
Here is my the where clause of my statement:
Where (CONVERT(varchar(10), visit_nextVisitDate, 103) between '02/04/2017' AND '15/05/2017')"
but I always get all rows for the same month (month 4). I tried this:
WHERE (CAST(dbo.Visits.visit_date AS date) BETWEEN '24/04/2017' AND '02/05/2017')
but I got an error cause my date fields are saved in format yyyy/mm/dd
How can I change the SQL date format to dd/mm/yyyy?