How to calculate next day from a date input variable?

studio

#1

Hi, I am new to the tool and trying to work with date calculations. I have created two variables as fromDate and toDate.
From date is a user input from Input Dialog. Todate will be calculated from the from date. toDate will be the next day of fromDate. What is the function that can be used here to achieve this. Help is appreciated.

Current Behavior:

Expected Behavior:

Studio/Robot/Orchestrator Version:

Last stable behavior:
Last stable version:
OS Version:
Others if Relevant: (workflow, logs, .net version, service pack, etc):


#2

Hello @kpuipath,

Try to use DateTime.AddDays(1)

https://www.google.es/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjZq7jKu5nXAhWB1RoKHRL1CLEQFggqMAA&url=https%3A%2F%2Fmsdn.microsoft.com%2Fes-es%2Flibrary%2Fsystem.datetime.adddays(v%3Dvs.110).aspx&usg=AOvVaw1fmhcPhgJhMBOlCWOO6t1S

Take a look at this:

Regads,
Susana


#3

Thanks for the quick reply. Can you please elaborate the suggestion.or provide any example .
I have variable called todate, what is the default value is to be added to get the next day from the from date variable.
example
Input dialog box - from date - 06/30/2017
to date output would need - 07/01/2017


#4

Hey @kpuipath

asdasd.xaml (5.7 KB)

Regards…!!
Aksh


#5

Hi, Aksh,
Thanks, it worked. I just need the date without time stamp. So changed to input_date.ToShortDateString.
Regards,
KP.