Change date format to dd.MM.yyyy - Spanish bug

Hi everyone,

I have a date in format dd-MMM-yy and I want to change it into dd.MM.yyyy.

I used this expression —DateTime.ParseExact(variable, “dd-MMM-yy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”)— and it works but sometimes the Month comes in Spanish like this “19-ene-24” and the system date is in English, so it throws and error at the assign activity.

How can I solve that ?? The input date is always in Spanish

Test to put the assign in a Try Catch and in the Catch section, create a new assign with ParseExact with Spanish CultureInfo: CultureInfo.CreateSpecificCulture("es-ES")

1 Like

Tnks it works perfectly

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