Unable to add date-time variable in UiPath process.

+1 vote
I am unable to add a date-time variable in a Sequence in UiPath studio. Can anyone suggest how can I do that?
Mar 25 in RPA by Nidhi
1,486 views

1 answer to this question.

+1 vote

Hey @Nidhi, in order to add a DateTime variable in a workflow in UiPath Studio, you can follow these steps:

  1. 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.

     
  2. Create a TimeSpan variable, called timeSpan, and in the Default field type 1.02:10:04.
  3. Now add an Assign activity in the Sequence. In the To field add timeToday and in Value field, type Now. 
  4. 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).
  5. Finally, add a Message Box and type timeToday in text field to see the current time.
answered Mar 25 by Anvi
• 13,960 points

Why we use 1.02:10:04 this ? What's that mean actually ?

Hi Nanda, we used 1.02:10:04 as a value of timeSpan, which means the timespan you wish to keep between the current time and last time. It basically means, you can set whatever value you want as timespan in day.hh:mm:ss format so the timeLast variable will display the currentTime-timeSpan. This value is set as a default to show in which specific format you want to keep your timeSpan. For eg. if you set 0.00:00:00 as default value of timeSpan, you will get current time only as an output of timeLast.

Related Questions In RPA

0 votes
1 answer

How to change date-time format in uipath?

Hey there, if you have a string ...READ MORE

answered Oct 24 in RPA by Abha
• 27,180 points
100 views
0 votes
1 answer

Unable to start my robot process from command line in Uipath

Hey Apeksha,  you can’t use /executor and /target ...READ MORE

answered Nov 8 in RPA by Abha
• 27,180 points
20 views
0 votes
1 answer

Add filter to excel table in UiPath

If you use *my value as the ...READ MORE

answered May 16, 2018 in RPA by wrecker
• 3,110 points
1,611 views
0 votes
1 answer

Can I create dictionary in UiPath studio and add items to it?

Hey @Rumani, you can definitely create dictionary ...READ MORE

answered Mar 13 in RPA by Abha
• 27,180 points
2,588 views
0 votes
1 answer

What is Get Jobs activity used for in UiPath Studio?

Hey @Rakesh, Get Jobs Activity can be ...READ MORE

answered Mar 13 in RPA by Abha
• 27,180 points
397 views
0 votes
1 answer

How to format text in notepad using UiPath?

Hey @Rashmi, if you want to automate ...READ MORE

answered Mar 18 in RPA by Anvi
• 13,960 points
1,180 views
+1 vote
1 answer

How can I display current date in "dd-MMM-yy" format in UiPath Studio?

Hi Shilpa, if you want to display ...READ MORE

answered Mar 18 in RPA by Pratibha
• 3,680 points
3,825 views
0 votes
1 answer

How to check if a string exists in datatable using UiPath?

Hi @Ravi, to check whether a string ...READ MORE

answered Mar 18 in RPA by Anvi
• 13,960 points
2,444 views
0 votes
1 answer

Unable to add custom library in UiPath Studio.

Hi @Neetu, if you have a custom ...READ MORE

answered Mar 25 in RPA by Anvi
• 13,960 points
185 views
0 votes
1 answer

Unable to use selectors in UiPath studio.

Hey @Megha, UiPath Studio uses Selectors to automate ...READ MORE

answered Mar 27 in RPA by Anvi
• 13,960 points
169 views