Getting Time for more than 4 hours

Hi Guys,

Currently I have the Excel Field inputs from below, how can I do the calculation below by knowing the deduction is more than 4 hours ??

  1. 8:30am – 7pm
  2. 11am – 12pm

Regards,
Jason

1 Like

Hi @jasonck2

Where do you want to compute the deduction in excel or UIPATH.?
As far as i know you can calculate it to your excel ?

cheers :smiley:

Happy learning :smiley:

2 Likes

Hi pattyricarte,

Basically after get to know the record for 4 hours and above, the bot need to go and select that slot from the meeting room then extract the organizer info, so can uipath do the deduction??

Regards
Jason

1 Like

cdate(Now.ToString(“hh:mm tt”))-cdate(cdate(“12:10:00 am”).ToString(“hh:mm tt”))
this is just for reference according to this make changes
it will give you the difference
so by using if condition you can do your require things

1 Like

Hi @jasonck2,

Check the attached xaml, let me know if you have any query.
TimeDiffCalc.xaml (5.1 KB)

1 Like

Hi Guys,

Still not able to get it works. Strange, trying to upload the sample .zip file here but it shows new user does not allowed to upload documents, so I only able to print screen of the error message , the popup box appear okay to get the both the start time and end time, but when using “Assign” , it just does not allowed with the error:

(Excel B2 = 8:30am – 7pm)

Have you tried the xaml which I have shared, you can pass the cell values to that xaml and get it calculated.

Hi sarathi125,

Thanks for trying to help, the Excel B2 field = 8:30am – 7pm , how to split and store into your “startTime” variable and "toTime variable ??

Regards,
Jason

@jasonck2,

You can split the cell value using hypen as

strValue.Split(New Char() {"-"c})

Then pass the first value to the start time and second time to the to time value.

Hi sarathi125,

Is there any sample ?? The code above means strValue[0] = 8.30am and strValue[1] = 7pm??

Jason

Check this xaml, you need to pass the input as your time string from the excel.
TimeDiffCalc.xaml (6.1 KB)
It will return the output of the diffrence

Hi sarathi125,

The sample you uploaded is having error, do you able to modify base on the sample I uploaded ??

Thanks again!!

Regards,
Jason

will you share the excel file or your xaml