Reputation: 1993
I want to fetch some result from table depending on time range so i did
SELECT * FROM TABLE where convert(varchar(10),CountryTime,108) between '15:00' and '16:00'
CountryTime- is of varchar type.. but iam not getting corect output plz suggets..
Upvotes: 1
Views: 3100
Reputation: 25370
Use varchar(5) instead of varchar(8)
SELECT *
FROM TABLE
where convert(varchar(5),CountryTime,108) between '15:00' and '16:00'
Upvotes: 1