I’m trying to retrieve date from mail using outlook and compare the same with the system date and their datatype is DateTime. I’m using an if condition to compare the dates and if it’s true, I’m writing the system’s date into a date column of the type DateTime in a database.
The problem is that, the “execute query” activity accepts only strings and if I’m trying to convert into a string using .ToString, it’s considering it as a string in the database and performing subtraction because of the hyphen(-) .
I tried with this query “insert into checkdate (date) values (curdate());” where checkdate is the name of the table in the database , date is the name of the column in which values have to be inserted and curdate() is the inbuilt function in MySQL which returns the current date. I worked and I am able to update the date in the database. .