I have a csv file with has a bunch of columns. One of the columns has Start Date and i’d like to pull each of the rows which has the date mentioned within the last 7 days.
I have tried the following & i’m getting weird results:
Thanks for coming back to me. I’ve implemented your fix & although i’m not getting any errors in UiPath, the output isn’t as expected. I only seem to be getting one result written to the csv rather than the 4 I was expecting from the ‘for each row’ activity.
Buddy that should work buddy
is your system time is correct buddy, just for clarification
Kindly check once with write line activity with this now.tostring@qwerty1
Yeah, from what i can see it initially captures the date in US format (even after i’ve passed it through Datetime.Parseexact(d1,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture) ) but other than that, my write line within the for each row just prints one single output rather than all the entries that match the condition
Whoops, sorry - all my dates (in the CSV and from what i’ve manipulated in UiPath) are UK dates (do dd/MM/yyyy). But in my for each row activity, i have an If statement where the condition is as you’d said start_date > now.AddDays(-7)
Within that, i have my Write line "Start Date: " + start_date.ToString + "Last week: " + now.AddDays(-7).ToString and thats printing in US format (unless i add .(“dd/MM/yyyy”)). I’m unsure if that means that UiPath is still ‘seeing’ the date in US format in some way, or if thats just normal (even after the dates been updated)