Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Test calculation of start and end period udfs.
DECLARE @TestDate datetime
SET @TestDate = CAST('08-15-2000' AS datetime)
SELECT dbo.udfBeginningOfYear(@TestDate) AS BeginningOfYear
, dbo.udfEndOfYear(@TestDate) AS EndOfYear
, dbo.udfBeginningOfSemi(@TestDate) AS BeginningOfSemi
, dbo.udfEndOfSemi(@TestDate) AS EndOfSemi
, dbo.udfBeginningOfQuarter(@TestDate) AS BeginningOfQuarter
, dbo.udfEndOfQuarter(@TestDate) AS EndOfQuarter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.