Change value "second" same date and time in excel datatable

Hi everyone
I have any problem
I have a data to upload
I have uploaded data, but if there are several values for the same date and time, the data will not be uploaded. (in the picture in the “Tgl.” column)
so that it can be uploaded, I have to manually change the “seconds”.
for example: from 23:59:59 to 23:59:58
can that be done by a robot?
anyone have any ideas?


Use a for each row activity and use below code in assign inside the loop,
row(“Tgl.”) = Cdate(row(“Tgl.”).ToString.Trim).AddSeconds(-1).
For Example: Cdate(“10/03/2021 23:59:59”).AddSeconds(-1)
Hope this may help you :slight_smile:


Hai @Manish540
Thx it worked
But i don’t mean like that
From the image that i pasted, there are 5 data with the same date and time 23:59:59
Can every “second” change but not the same?
Like an increment operator

To be like this

Instead of 23:58:58 all

Hi @Kabeng ,
in the logic of @Manish540 , in the foreach row that you use, you can notice in the properties as an output “index”, use it and then change
row(“Tgl.”) = Cdate(row(“Tgl.”).ToString.Trim).AddSeconds(-1)
row(“Tgl.”) = Cdate(row(“Tgl.”).ToString.Trim).AddSeconds(-(index+1))


I have error like this

Please check my project

am sory i still newbie and still learning about uipath

New (87.3 KB)

I’ve also been looking for references and solutions for this on Google and YouTube. but still an error.

Hi @Kabeng !
I think that now it should work; but change the “a” value as it was before :wink:
Main.xaml (12.1 KB)
Don’t forget to check “add headers” at the write range activity

thank you very much, it works very well

but when I show it to the user, the more data there is, the more time it changes, for example, from 20:40:15 to 20:25:16.
because previously it decreased (- (Sec+1))

so is it possible to only change the same datetime ?
please help me if it can
I’m sorry that users from my office have a lot of requests

Hi !
Ok, i’ll try to send you a new WF withing the day :grin:

okay, i still waiting for WF it

Sorry, I ended up not having time to do it :no_mouth: being it friday today I’m sending it today :wink:

@Kabeng what about this one ?
Main.xaml (12.5 KB)