Hey @Nidhi, in order to add a DateTime variable in a workflow in UiPath Studio, you can follow these steps:
- Create a new Sequence and create two variables, timeToday and timeLast. To set the variable type click on drop-down and click Browse for Types. Now in Search bar type DateTime and select DataTime variable under System.
- Create a TimeSpan variable, called timeSpan, and in the Default field type 1.02:10:04.
- Now add an Assign activity in the Sequence. In the To field add timeToday and in Value field, type Now.
- Add another Assign activity under the previous one. In the To field, add the timeLast variable and in the Value field, type timeToday.Subtract(timeSpan).
- Finally, add a Message Box and type timeToday in text field to see the current time.