Hello
I am get a variable of date like this e.g : 21.02.23
And I want to convert it to : 21/02/23
How can I do that please ?
Thanks.
Hello
I am get a variable of date like this e.g : 21.02.23
And I want to convert it to : 21/02/23
How can I do that please ?
Thanks.
Try this,
DateTime.ParseExact("21.02.23", "dd.MM.yy", System.Globalization.CultureInfo.InvariantCulture).Tostring("dd/MM/yy")
The 21.02.23 is a Dynamic variable - its not consist date.
How to implement ?
HI @mironb,
Refer below link for all kind of date conversion
All about Datetime - UiPath - News / Tutorials - UiPath Community Forum
Regards,
Arivu
Hi @mironb ,
assign the date value to string argument as strDate
DateTime.ParseExact(strDate, "dd.MM.yy", System.Globalization.CultureInfo.InvariantCulture).Tostring("dd/MM/yy")
Regards,
Arivu
Instead of the static value you can use the variable.
DateTime.ParseExact(yourDateValue, "dd.MM.yy", System.Globalization.CultureInfo.InvariantCulture).Tostring("dd/MM/yy")
not “Dt” please mention Datetime.ParseExtract
DateTime.ParseExact(Dt.ToString(), "dd.MM.yy", System.Globalization.CultureInfo.InvariantCulture).Tostring("dd/MM/yy")
Regards,
Arivu
Thank you very much
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.