Sample Header Ad - 728x90

SSIS Variables as expressions to generate Start and end dates of a quarter with input year and month passed as variable

0 votes
1 answer
270 views
Can someone help me create SSIS expressions for variables to generate QuarterStart(DateTime) and QuarterEnd(DateTime) as a variable with year(int32) and quarter(int32) passed on as user variables. The equivalent T-SQL script would be
@FISCAL_YEAR INT = 2023,
    @QUATER INT = 1
SELECT 
    DATEFROMPARTS(@fiscal_year,(@Quater * 3)-2,1) AS QuaterStart,
    EOMONTH(DATEFROMPARTS(@fiscal_year,@Quater * 3,1)) AS QuaterEnd
Asked by mk SQL (5 rep)
Jan 29, 2024, 03:21 AM
Last activity: May 21, 2025, 01:01 AM