I have a table called local_time which has two int fields hour and min. I need to get records between hour and time.
Here is my query.
select convert(nvarchar(10),local_time.Hour) + ':'+
convert(nvarchar(10),Local_time.Minute)
from local_time
where convert(nvarchar(20),local_time.Hour) + ':'+
convert(nvarchar(20),Local_time.Minute) between '6:00' and '10:45'
If I pass 6:00 to 9:45 works fine,
10:00 to 11:45 works fine
but when i pass 6:00 to 10:00 I don't get any records, even though there are records.
Thanks for any help
Here is my query.
select convert(nvarchar(10),local_time.Hour) + ':'+
convert(nvarchar(10),Local_time.Minute)
from local_time
where convert(nvarchar(20),local_time.Hour) + ':'+
convert(nvarchar(20),Local_time.Minute) between '6:00' and '10:45'
If I pass 6:00 to 9:45 works fine,
10:00 to 11:45 works fine
but when i pass 6:00 to 10:00 I don't get any records, even though there are records.
Thanks for any help