1
Reply

error Display Datetime in Specific Format

Mani Kandan

Mani Kandan

Apr 6 2016 9:53 AM
348
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)