Hi @Rubot,
As you mentioned,
StartDate (dateTime variable) = DateTime.ParseExact(modifiedDate,“MM/dd/yyyy hh:mm:ss”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”))
In the above variable StartDate, what is the datatype you have set?
You have extra ) in your Expression, I have modified it.
Updated expression: DateTime.ParseExact(modifiedDate,“MM/dd/yyyy hh:mm:ss”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)
Note: Both the variables, modifiedDate & StartDate must be in String datatype because in the expression at the end you have converted the value into string (.ToString(“dd/MM/yyyy”))
Check this thread for better reference:
US date to UK date - Help - UiPath Community Forum
I have shared a sample flow, in this I have created two variables:
USDate = “06/15/2020 14:45:43” [Datatype as String]
UKDate = DateTime.ParseExact(USDateTime, "MM/dd/yyyy HH:mm:ss", CultureInfo.InvariantCulture).toString("dd/MM/yyyy")
[Datatype as String]
RubotUStoUK.zip (2.2 KB)
I hope your issue would be solved with the above explanation.
Regards,
@90s_Developer