Something about system.datetime operation

test.zip (28.9 KB)

i want to find out the date from a excel item which is overdue for 60 days.but i don’t now how to achieve it.and this excel is auto output from the sap system,and i find this item is not define to date type.Do I need to convert this to system.datetime first?Thanks for your help in advance.

Yes that’s correct that is a required thing. Convert the column with the date field to date and then apply the filter for any date above 60 days to be picked.

1 Like

Hi @chlo,

do as follows
Create a assign activity and assign dueDate as follows
dueDate = DateTime.Today - DateTime.Parse(row(“due date”).ToString)
in your loop check following condition in if activity
dueDate.Days>60

solution attached
test sam.zip (24.3 KB)

2 Likes

@chlosh, I have made sure that the results are accurate (the number of overdue dates) by comparing what the bot calculates against manual calculations on this site:

Here is the sample workflow.
test.zip (31.3 KB)

1 Like

yes, it is working,thanks for your help

1 Like

thanks for your suggestion.

1 Like

ok,it also help for me.thanks a lot.

@chlosh, we are happy to have helped buddy.

Looks like you marked the wrong post as the solution, Please correct that and mark @SamanGuruge post.

This will be confusing to other people searching for the solution to a similar issue. this is what it look like:

1 Like

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