How to convert Afrikans Date "09-Mei-2024" into US date format "dd/MM/YYYY"

How to convert Afrikans Date “09-Mei-2024” into US date format “dd/MM/YYYY”
I tried using below code but its throwing error
DateTime.ParseExact(““09-Mei-2024””, {“dd-MMM-yyyy”}, new CultureInfo(“en-US”),DateTimeStyles.None).tostring(“MM/dd/yyyy”)

output error -
The following errors were encountered while processing the workflow tree:
‘VisualBasicValue’: Compiler error(s) encountered processing expression “DateTime.ParseExact(”“09-Mei-2024”",

{
“dd-MMM-yyyy”
},
new CultureInfo(“en-US”),DateTimeStyles.None).tostring(“MM/dd/yyyy”)".(2) : error BC32017: Comma,
‘)’,
or a valid expression continuation expected.

Hi @shashidhar.marihal

Try this:

str_Date = "09-Mei-2024"

Output = DateTime.ParseExact(str_Date, {"dd-MMM-yyyy"}, New System.Globalization.CultureInfo("af-ZA"), System.Globalization.DateTimeStyles.None).ToString("MM/dd/yyyy")

Hope it helps!!

1 Like

Hey @shashidhar.marihal ,

Use this Code in assign
Replace The Datee Variable with Your Variable .

DateTime.ParseExact(Datee, “dd-MMM-yyyy”, New CultureInfo(“id-ID”)).ToString(“MM/dd/yyyy”)

Cheers :upside_down_face: .

1 Like

@Parvathy , @jawagarraja123 - Its working , Thanks a Lot :slight_smile:

@shashidhar.marihal

Please mark my post as solution to close the loop.

Regards

Done, marked the solution.

1 Like

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