Sqlserver
 sql >> Database >  >> RDS >> Sqlserver

Come ottenere l'ora dal formato DateTime in SQL?

SQL Server 2008:

SELECT cast(AttDate as time) [time]
FROM yourtable

Versioni precedenti:

SELECT convert(char(5), AttDate, 108) [time]
FROM yourtable