Read data from another column

Example I have variable lot_no as string = 068_160266

But I want to read data in column Month that what month?
and convert to month number

image
Example I have variable lot_no as string = 068_160266
that month = Feb , I want to convert FEB to 2

  • Expected output : I want output = 2

Please guide me about it.
dt.xlsx (12.1 KB)

1 Like

Hey @fairymemay

Here you go… Please find the attached workflow for reference.

nmnithinkrishna_FindAColMatchingOtherCol.zip (8.5 KB)

Hope this helps.

Thanks
#nK

1 Like

@Nithinkrishna Now output = JAN → If I want convert to number = 1
Please guide me about it.

To convert a month to its corresponding number

str_monthnumber = Datetime.ParseExact(Strinput.ToString, “MMM”, System.Globalization.CultureInfo.InvariantCulture).ToString(“MM”)

Cheers @fairymemay

1 Like

@Palaniyappan Follow your code, If month January output = 01 —> I want output show 1.

How to edit your code?

2 Likes

Then mention like this

str_monthnumber = Convert.ToInt32(Datetime.ParseExact(Strinput.ToString, “MMM”, System.Globalization.CultureInfo.InvariantCulture).ToString(“MM”)).ToString

Cheers @fairymemay

2 Likes

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