Problem with datatype by insert

Hello,

I am trying to write down some information in database.It is ok when the columns are text format, but when the column type is date/time format, UIpath always give me syntax error notice.I go through one similar post Problem with datatype while updating the database and tried the solution, no luck.

Please suggest a solution. thank you !123

Hi @Wendy_01
Instead of Execute query can you try passing it into Insert Activity

Thanks
Ashwin S

hello @Wendy_01

Can you try to insert “#” before your date variable or date value

like : Var1 = 01/22/2020
“where col1 = #”+ Var1+“#”

Regards
Ajay

What I understand insert activity input shoud be datatable, but my input is not a datatable, so I need to build the datatable first?

same thing. no luck

remove tostring, just pass the date itself . might work

tried, uipath not allow date format variable to string in SQL input

@ tamshi
Can you show your SQL input ?

it works! Thank you @AshwinS2
and I also update it with Execute Query activity.

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