need help in ssis expression

Farhan Jamil 416 Reputation points
2021-07-06T13:37:55.757+00:00

Hi Guys

I have a sql statement and i want the equivalent ssis expression for both sql statement

SQL Statement:-

SELECT right(cast(getdate()as date),2)+' '+DATENAME(MM, GETDATE()) + ' ' + CAST(YEAR(GETDATE()) AS VARCHAR(4)) AS [Month YYYY]  

SELECT right(cast(getdate()-3 as date),2)+' '+DATENAME(MM, GETDATE()) + ' ' + CAST(YEAR(GETDATE()) AS VARCHAR(4)) AS [Month YYYY]  

Result Screenshot
112183-image.png

Any help will be appreciated

Regards
Farhan Jamil

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,446 questions
0 comments No comments
{count} votes

Accepted answer
  1. Farhan Jamil 416 Reputation points
    2021-07-06T15:05:51.473+00:00

    never mind. solved it myself

    equivalent ssis expression

    RIGHT("0" + (DT_WSTR, 2) DATEPART("DD", DATEADD("day", -3, GETDATE())),2)+" "+(DT_STR,50,1252)TRIM(SUBSTRING("January Febuary March April May June July August September October November December ",((DATEPART("MONTH",GETDATE())-1)*10)+1,10))+" " +RIGHT("0" + (DT_STR,4,1252)DATEPART( "yyyy" , getdate() ), 4)

    112225-image.png

    0 comments No comments

0 additional answers

Sort by: Most helpful