Getting error “cannot assign from type “System.DateTime” to type “Uipath.Excel.ExcelValue” in assign activity save for later”

Hello,
I am experiencing a few problems to get the current date and time because this error appears when i try to Assign a variable in the Save for Later activity:
“cannot assign from type “System.DateTime” to type “Uipath.Excel.ExcelValue” in assign activity save for later”

And in the save for later i have:
DateSelection (as the variable name i chose) = System.DateTime.Now.ToString() (i have also already put the format as dd/MM/yyyy and without the format.) And i am all out of ideas.

Capture

Thank you very much,
Best regards
Cédric

Hi,

Can you try the following steps?

First, put SaveForLater activity.

Then ,in left side, click + and SaveForLateUse. And input variable name.

Next click + and Advanced Editor, and modify ExcelValue to String as the following.

img20211105-2

Finally, input expression : Now.ToString("dd/MM/yyyy") in right side.

Regards,

Sure ! It works !
Thank you very much, I’m ashamed that I didn’t think about it ! :sweat_smile:

1 Like

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

Hello,

If you can upgrade we have enabled this functionality by default in 21.10

image

Regards,
Dragos.