1
Answer

error Display Datetime in Specific Format

Mani Kandan

Mani Kandan

8y
359
1
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)
Answers (1)