Unable to format string value in DateTime format using Format Value activity


I am trying to format a Generic value which is in Date format i.e. “31/12/2017” using Format Value activity but UiPath throws an error stating Cannot Convert Generic Value to Syste.DateTime

Please assist if I need to format a generic value to datetime format of “MM/dd/yyyy”


Hi @Ashish32229,

Generic value -> genValue (31/12/2017)

Arivu :slight_smile:

Hey Arivu,

Thanks for response but I need to format using Format Value activity… Is that possible?

Above way is already used by me but was checking for Format value activity.

It will not support in Format to Date time value, so use the below one.

Arivu :slight_smile:

is it possible to convert date to OA date format ?

because I want to compare my date to all the dates in excel, so when I read Range date column, it gives me all the OA dates, so if conversion of date to OA date is possible then it would be easy for me to simply convert my date into OA date and compare them.

Hi @samir

I didn’t test it, but you could check this method:

hey @loginerror
thanks for the reply, :slightly_smiling_face:
yes! I got it, I used this:

1 Like