Hello Yoichi,
Thank you for getting in touch. Obviously when I will use 2 we won’t have output since the date will be in future However for -2 I am getting the list of emails that I have for the last two days.
The main issue here what do I have to use to read the value stored in my variable nDays since the bot is behaving in the right way when I specify the number of days manually into the expression like this “[Received] >= '” + DateTime.Today.AddDays(-1).ToString(“d”) + " 00:00AM’ AND [Received] < ‘“+ DateTime.Today.ToString(“d”) + " 00:00AM’”
However it’s returning the wrong result when I use saved values Saved.Values(Of UiPath.Excel.ExcelValue)(“nDays”) instead of -1.
I have many doubts what is the data type of the output for the input activity ? because as far as I understood it’s string maybe I do have to convert it to type int before using it in my expression ?