When I am try to get date between to data and change the Specific Format datetime, then error occured. please Help me...
select mydate
from Tble_xxx
where CONVERT(varchar(20), mydate, 120)
BETWEEN CONVERT(varchar(20), (@startdate, 'yyyy-MM-dd HH:m:ss:mmm', 'en-US') , 120)
AND CONVERT(varchar(20), (@enddate, 'yyyy-MM-dd HH:m:ss:mmm', 'en-US'), 120)