Month Cannot Be Used As Expression

Hello,

I’m using the append range activity throughout my workflow. In one .xaml I use the following expression and there are no errors.

in_Config(“basePath”).ToString+in_Config(“logsFolder”).ToString+""+in_config(“processName”).ToString+in_config(“logsFolder”).ToString+"_"+monthNames(Month(startTime)-1)+Year(startTime).ToString+".xlsx"

However, in another .xaml I use the exact same activity and expression and I get an error of 'Month is a Type and can not be used as an expression. It’s the same variables and namespaces throughout the file.

Any idea why I’m getting this error?

Thanks,
Brad

buddy instead you can use like this @bradsterling
+now.ToString(“MM_yyyy”)+

Cheers @bradsterling

Thanks! This worked. I knew there was a better solution than what I was using.

I ended up using now.ToString("MMMM") to get the full spelling but it worked nonetheless.

Cheers @Palaniyappan

1 Like

Fantastic buddy
Cheers @bradsterling
Keep going

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.