SSIS - MonthName and Day Name in SSIS


Some time we have requirement to send email with MonthName or dayName in the subject in SSIS Package or need to create folder with Month Name and then Archive files e.g. Archive_Dec_2011. How we can create folder or have subject in email with Month Name or Day Name by using SSIS Package?


We don't have Month-Name or Day-Name in SSIS Package.We can create two variables in our package and write expressions on them to use them wherever we need Month Name and Day Name.

Step 1:
Let's create VarDayName and VarMonthName variables in our SSIS Package so we can write expressions on them and use in our Package where we need Month Name an Day Name.

How to get Month Name and Day Name in SSIS Package - SSIS Tutorial for Beginners

Step 2: 
Go to the properties of VarDayName variable and then configure as shown below.

Write expression to get Day Name in SSIS Package - SSIS Tutorial

Expressions for Month Name:
DATEPART("dw",GETDATE())==1? "Sunday":

Step 3:

Go to the properties of DayMonthName variable and write expressions as shown below.

Expressions for Month Name:
(MONTH(getdate()) == 1 ? "Jan" :
MONTH(getdate()) == 2 ? "Feb" :
MONTH(getdate()) == 3 ? "Mar" :
MONTH(getdate()) == 4 ? "Apr" :
MONTH(getdate()) == 5 ? "May" :
MONTH(getdate()) == 6 ? "Jun" :
MONTH(getdate()) == 7 ? "Jul" :
MONTH(getdate()) == 8 ? "Aug" :
MONTH(getdate()) == 9 ? "Sep" :
MONTH(getdate()) == 10 ? "Oct" :
MONTH(getdate()) == 11 ? "Nov" :
MONTH(getdate()) == 12? "Dec":"")

Now you have Month Name and DayName available through these two variables ,
Those can be used in expression with different transformations as required.

Related Posts
How To Use Expression Task To Get Day Name and Month Name In SSIS Package
Video Demo : How to use Expression Task to get Month Name in SSIS Package


  1. Good one... but we just ignore these :(.

  2. I am astounded by the impact that liposomal glutathione has had on my general health since I began taking it regularly. Since I have a very hectic lifestyle, I am always on the lookout for methods to strengthen my immune system and facilitate cleansing. In this respect, liposomal glutathione has proven revolutionary. In addition to enhancing my energy levels and general well-being, it also helps my body's defences against oxidative stress. If you want to improve your health from the inside out, try it!