Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

DATEADD convert minutes to time

$
0
0

Hi,
I have a SQL table that has following fields & data..
ID NAME START
1  User1  631
2  User2  726
3  User3  551
4  User4  908

My query looks like this:
Select Top 1000
ID
,NAME
,START
,DATEADD(minute,START,0)
from table1

query results:

ID NAME START (No column name)
1  User1  631  1900-01-01 10:31:00.000
2  User2  726  1900-01-01 12:06:00.000
3  User3  551  1900-01-01 09:11:00.000
4  User4  908  1900-01-01 15:08:00.000

How can I exclude date part & the seconds part from the DATEADD command so that result will be
10:31
12:06
09:11
15:08

How can I have column name/head for the DATEADD instead as "No column name".

Any help would be much appreciated, thank you.


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>