Saving month february as 2

Hello,
I am trying to save the report by the name of “report_name + id+ month_name”.
In case of month name it stores 2 for february , 4 for april and so on.
I even used a message box to display month.string and it shows the month name correctly, but while saving it will save the number.

Please help,
Thanks.

1 Like

@karnik can you please share your workflow

Hello

Try convert the variable as below

fullMonthName = New DateTime(2015, 10, 4).ToString(“MMMM”, CultureInfo.CreateSpecificCulture(“es”))

Hi Karnik,

The attached error screenshot stats that you are trying to read a csv file which is not available in the system.

To save the csv as per your requirement use write csv activity with below path
report_name + id+now.ToString(“MMMMMMMM”)+".csv"

Also you can Date.now.ToLongDateString, this will output something like: Thursday, 04 October 2018

So, once you have done this, you can Split the result between " " (blank spaces), it will output you an array, call it for example arrayResult.

After that you can put: arrayResult(2).Tostring and you will get October

The first position [arrayResult(0)] would be Thrusday, , the second [arrayResult(1)] 04, third [arrayResult(2)] October, last [arrayResult(3)] 2018

Hope you understand.

Bests,
Pablo

1 Like