Date required proper format

HI,

I am Using UIpath Studio C#

we have received date below format

06/05/2022 uipath read as 5-Jun-2022 but actually date 6-May-2022
05/02/2022 Uipath read as 2-Feb-2022 but actually date 2-May-200

how we get proper format date

DateTime.ParseExact(stringVariable, "dd/MM/yyyy", nothing).toString("d-MMM-yyyy")

Example

DateTime.ParseExact("06/05/2022", "dd/MM/yyyy", nothing).toString("d-MMM-yyyy")
image

not work . using C# Uipath

1 Like

sorry, for c# use this

DateTime.ParseExact(stringVariable, "dd/MM/yyyy", null).ToString("d-MMM-yyyy")

example
DateTime.ParseExact("06/05/2022", "dd/MM/yyyy", null).ToString("d-MMM-yyyy")

thank you sir , for quick response its work

1 Like

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