Read month only from date format

Greeting,

As mentioned from title above, I try to make the bot read month only from the date. For example: 01/03/2021 to 3 only. From my previous developer, he try using assign activities, but the output got logical error.

The dateformat read as dd/mm/yy

System.Text.RegularExpressions.Regex.Replace(dateoutput ,“\d”, “”)

The input was “31/01/2021”

The output becomes “//”

Appreciate for the solution.

this will give you 3 (as integer )
DateTime.parseExact("01/03/2021", "dd/MM/yyyy", nothing).Month
image

It was in string format since I capture the date from excel and assign it into variable. So im getting error conversion.

image

whats the error?

if bankReconcillation is string, you need to add .toString after Month

Thanks, it works ! Appreciated

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