gpt4 book ai didi

tsql - T SQL : How get all minutes from Time type

转载 作者:行者123 更新时间:2023-12-04 10:01:12 25 4
gpt4 key购买 nike

我有以下代码,我想从时间类型中获取所有分钟。

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com