SQL Server 2008:
SELECT cast(AttDate as time) [time]
FROM yourtable
Earlier versions:
SELECT convert(char(5), AttDate, 108) [time]
FROM yourtable
More Related Contents:
- Sql Server string to date conversion
- Check if table exists in SQL Server
- Insert multiple rows WITHOUT repeating the “INSERT INTO …” part of the statement?
- SQL query to select dates between two dates
- Does T-SQL have an aggregate function to concatenate strings? [duplicate]
- Parameter Sniffing (or Spoofing) in SQL Server
- What is the significance of 1/1/1753 in SQL Server?
- SQL Server String or binary data would be truncated
- Datatype for storing ip address in SQL Server
- How to change identity column values programmatically?
- How much size “Null” value takes in SQL Server
- best way to convert and validate a date string
- SQL – The conversion of a varchar data type to a datetime data type resulted in an out-of-range value
- Date conversion and culture: Difference between DATE and DATETIME
- SQL Server ORDER BY date and nulls last
- SQL Query to find the last day of the month
- How to remove accents and all chars a..z in sql-server?
- WHERE clause on SQL Server “Text” data type
- SQL Server error on update command – “A severe error occurred on the current command”
- Aggregate bitwise-OR in a subquery
- How can I get the sum of multiple datetime values?
- SQL server schema and default schema
- Check if a string contains a substring in SQL Server 2005, using a stored procedure
- FOR XML PATH(”): Escaping “special” characters
- Cannot find either column “dbo” or the user-defined function or aggregate “dbo.Splitfn”, or the name is ambiguous
- Does query plan optimizer works well with joined/filtered table-valued functions?
- What are row, page and table locks? And when they are acquired?
- Convert UTC Milliseconds to DATETIME in SQL server
- @@ERROR and/or TRY – CATCH
- How to calculate difference in hours (decimal) between two dates in SQL Server?