If you want to know the amount of elapsed minutes in the current quarter, you can use the following T-SQL code:

declare @CurrentDateTime datetime = '2014-03-27 10:56:10'
declare @MinutesPassedInHour int = convert(int, datepart(minute, @CurrentDateTime))
declare @quarterCount int = @MinutesPassedInHour / 15
declare @MinutesPassedInQuarter int = (@MinutesPassedInHour - (@quarterCount * 15))
select @MinutesPassedInQuarter

-- Result: 11

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.