13,003,150 members (59,902 online)
Rate this:
See more: , +
```I want to get only Time from DateTime column using SQL query using SQL Server 2005 and 2008 Default output:

AttDate
==
2011-02-09 13:09:00
2011-02-09 14:10:00

I'd like this output:
AttDate                Time
==
2011-02-09 13:09:00    13:09
2011-02-09 14:10:00    14:10```
Posted 8-Apr-13 1:14am

Rate this:

## Solution 6

in Sqlserver2008:

Select cast(your Column as time) [time]
from yourtable
Rate this:

## Solution 5

`SELECT (getdate()),substring(CONVERT(VARCHAR, GETDATE(), 108),0,6) AS Time`
v3
Naz_Firdouse 9-Apr-13 0:54am

what's wrong in my answer? why downvote?
Rate this:

## Solution 1

use this
`Select AttDate,RIGHT(CONVERT(VARCHAR, AttDate, 100),7) as Time From Tablename`
Rate this:

Rate this:

## Solution 3

Try this:
```SELECT CONVERT(VARCHAR(5),GETDATE(),108) AS Time
--Assume AttDate is DateTime column of Table1
SELECT AttDate, CONVERT(VARCHAR(5), AttDate,108) AS Time FROM Table1```

OR
```SELECT LTRIM(RIGHT(CONVERT(VARCHAR(20), GETDATE(), 100), 7)) AS Time
SELECT AttDate, LTRIM(RIGHT(CONVERT(VARCHAR(20), AttDate, 100), 7)) AS Time FROM Table1```

--Amit
v3
Rate this:

## Solution 4

`SELECT CONVERT(VARCHAR, GETDATE(), 108) AS Time`

In format hh:mm:ss
v2

Top Experts
Last 24hrsThis month
 OriginalGriff 283 F-ES Sitecore 160 RickZeeland 159 ppolymorphe 155 Bohdan Stupak 105
 OriginalGriff 4,930 ppolymorphe 2,527 RickZeeland 2,360 Kornfeld Eliyahu Peter 2,041 Richard Deeming 1,673