There are many t-sql CONVERT strings to produce quite a variety of date and or time strings. But I cannot find the solution to needing no date and no seconds.
We want to return the time only from a datetime field, and eliminate the seconds. It would not matter if the seconds were truncated or rounded, but we need to show no seconds.
desired results- from any DATETIME field
Would this do it?
select CONVERT(varchar(15),CAST(GETDATE() AS TIME),100)
Just change out
GETDATE() with your date variable.