I have one Table which has two fields such as \"StartTime\" and \"EndTime\". The DataType of the Two columns are Time.
So the Values of the Table looks like as follo
select CONVERT(varchar(15),CAST('17:30:00.0000000' AS TIME),100)
almost works perfectly except for the space issue. if that were changed to:
select CONVERT(varchar(15),CAST('17:30:00.0000000' AS TIME),22)
...then you get the space. And additionally, if the column being converted is already of TIME format, you can skip the cast if you reference it directly.
Final answer:
select CONVERT(varchar(15),StartTime,22)