How to extract month from string?

activities

#1

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!


#2

@leewe01
you can use trim function to do this.


#3

Hi @SagarSB,

Would you mind to elaborate further about it?


#5

Try this
Month


#6

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.”


#7

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


#8

Hi @Manjuts90,

Thanks for the feedback!

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


#9

Check the below workflow

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


#10

Thanks!

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


#11

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


#12

The values I got from Json is Jobject.


#13

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