How to extract month from string?

Hi,

Can anyone guide me on how to extract the months from the following dates in data tables?

Dates:
2013-03-18
2015-05-07
2016-06-22

Thanks in advance!

@leewe01
you can use trim function to do this.

Hi @SagarSB,

Would you mind to elaborate further about it?

Try this
Month

Hi @Bharat,

Thanks for the suggestion.

I’ve just tried. But it pops out an error as follows. Please advice.

“Assign: String was not recognized as a valid DateTime.”

@leewe01 (Now.Month).ToString it gives month for present date

Hi @Manjuts90,

Thanks for the feedback!

However, I would need to extract the months from the series of dates shown above. Please advice.

Check the below workflow

@leewe01 instead of Now give column number and checkdt.xaml (8.0 KB)

Thanks!

But it pops out an error, Option Strict On disallows late binding.

@leewe01m what will be the type of value u get from json whether it is in string format?

The values I got from Json is Jobject.

@leewe01 can u convert that Json object to string type. Then apply that statement.