how to find month in text format in month column kindly share your knowledge
Tried this approach?
its not working sir…
Would you specify what’s not working or error. We can make it work.
You need to save the code into a text file in your project folder then pass that file name here.
and in place of "Main"
pass "Macro1"
Hie @domsmgtmeet22 hope this help you
your process
your input
inside for each row use this
save your row value in a variable
your convert logic
finally your output
Note: this two variable that i create inside the for each is of string type
also change your date format as per your logic
cheers Happy Automation
Can you try below
For Each row As DataRow In dt.Rows
row("Month") = DateTime.ParseExact(row("PO Date").ToString(), "dd-MM-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("MMMM")
Next
Regards,
Download this code and configure your activity as per it.
https://www.uipath.com/hubfs/Activities/InvokeVBA%20Example.zip
Can you Show me the Output Date Format of po_date variable like use log message for the po_date variable and show the extract data i need to view the format
show an log message but its not write datatable
after the po_date use log message and comment out the 2 assign variable and run the process then it will show the output
i see log message output its correct. but its not write datatable
Actually i want to see your Output format because when i try it will give me the data like this
but i have to convert it to this first
Actual data is coming in this format from excel

you can see the difference
try this method
Summary: i think while bot read the data from the excel it also take the hour:minute:second also from so first we have to split so we can only get the time and extract the month
cheers
1.First Read The Sheet, you will get output as data Table.
2. Now use For each row in datatable Activity and pass the Dt .
3. Now take one assign , In that create one string type variable
For eg: str_date = currentrow(“PO Date”).tostring.Split(" "c)(0)
4. Now create another string type varible
For Eg : str_Month = DateTime.ParseExact(str_date,“MM/dd/yyyy”,Nothing).tostring(“MMMM”)
5. Now take one assign
currentrow(“Month”)=str_Month
This will Update Month Column
Please Refer Below Screenshot:
If you like my solution please mark it as solution. Thanks
@domsmgtmeet22
Try with the below sequence:
newdate = DateTime.ParseExact(inputDate, “dd-MM-yyyy”, System.Globalization.CultureInfo.InvariantCulture)
monthName = parsedDate.ToString(“MMM”)
Use this inside for each row activity and as an input date pass the value present foreach row.
Thanks ,
Jagravi