Capture the activity time into a cell in excel

Hey,

So I am reading an excel sheet and for each Row if the column has “Active” I am performing a task to send an email.

I have another requirement that, if an email for that particular row item was sent within 3 hours, it should not be sent again

As a solution for this, I was thinking to capture the time post the send email activity in the last cell of the row. Post which I will compare with the current time and if it greater than 3 hours, only then send the email.

Now I am not sure how do I capture the activity time into the column cell of the current row. I also need to make sure that the captured time should not keep changing/remain unchanged once captured unlike the ‘Now()’ in excel which keeps updating

Any sugessions?

Hi,

String Variable1 = System.DateTime.Now.ToString (“hh-mm-ss”), put this value in the datatable column where you want to store time.

Hey, thanks for the response @prateek.mehandiratta9 , so I used “Get Row Item Activity” to assign that cell to a variable ‘Senttime’. Do you want me to use Assign activity post sent outlook email and under Save to use ‘Senttime’ and under Value to use enter ‘System.DateTime.Now.ToString (“hh-mm-ss”)’ ?

Is this what you mean?


Hey,

You already have datatable right, so why not assign it directly once you done sending email:

row(“ColumnName”)= System.DateTime.Now.ToString (“hh-mm-ss”)

Thanks for your time @prateek.mehandiratta9 , really appreciate it.

I get the below error. I get the same error even if I use assign activity as you started above, Not sure where I am doing wrong

This error is caused by double quote except 0x22 (") For now, can you replace or retype double quote with "

Follow the post ::
Visual basic workflow compilation error - Help / Studio - UiPath Community Forum

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.