我有以下代码,我想从时间类型中获取所有分钟。
declare @time time
set @time = '01:30'
declare @minutes int
--select @minutes = convert time to minutes here
select @minutes -- @minutes == 90
请帮忙。
最佳答案
@time
和midnight;之间的区别
set @minutes = datediff(minute, '00:00:00', @time)
关于tsql - T SQL : How get all minutes from Time type,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12689456/