Date format to full length

Goodmorning,
I have an date read from excel. Now the date is 11-02-2019 but i need to change it to 11-februari-2019.
Someone can help me with this issue?

1 Like

HI @438654
please follow below link

Thanks

@438654
You can use DateTime.ParseExact("11-02-2019", "dd-MM-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MMMM-yyyy")

Hi @438654,
You can use DateTime.ParseExact

Assuming the date (11-02-2019) is assigned to variable named strDate.
Then you can use the answer @KannanSuresh provided.
But replace the “11-02-2019” to strDate.

Thanks and regards.

3 Likes

It’s giving me that it isn’t a valid DateTime

Can you upload your workflow here? Thanks :slight_smile:

1 Like

Main.xaml (20.7 KB)

1 Like

Please see this example workflow:
Sequence.xaml (4.5 KB)

1 Like

The file contains errors

What is the version of your UiPath studio?

1 Like

2019.4.2

Can you send a screenshot of the error?


This error is also in the other files

BlankProcess38.zip (11.2 KB)

1 Like

it is still there :frowning:

Have you tried updating the packages?

1 Like

hmm which one i have to update?

1 Like

okay your file is working now. The difference i see is that you assigning an value StrDate to “11-02-2019” my value, for example StrDate, is coming from an Excel file. The value 11-02-2019 is in the excel file with get row. So maybe it’s because the value is an GenericValue?

1 Like

Okay. Good.
Can you use a message box to view the value of the date from the excel file? :slight_smile:

1 Like