CultureInfo not working as expected

Hi everyone,

At the moment, I am trying to display the following String variable on a Message Box Activity:

DateTime.ParseExact(“13/12/2018”, “dd/MM/yyyy”, new CultureInfo(“pt-BR”) ).ToString(“MMM/yy”)

Am I using ParseExtract method or CultureInfo object in a incorrect way?

The expected result must be:
Dez/18

But, it’s always displaying like this:
Dec/18

Thanks in advance!
Vinicius

1 Like

Hey @Vinicius

Try this-

DateTime.ParseExact(“13/12/2018”, “dd/MM/yyyy”, new CultureInfo(“pt-BR”) ).ToString(“MMM/yy”,CultureInfo.CreateSpecificCulture(“pt-BR”))

Regards…!!
Aksh

3 Likes

It worked for me! Thanks!

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