Empty files on the first day of the month

Hi guys,

I did a flow that filters dates to get information in - 1 or -3 days.

My problem is that when I want to do my filtering (column reference Q in my Excel file) at the beginning of the month (ex- elements from 08/31 to 09/01) I have nothing. Especially since the other days work perfectly.

I put you the flow and the excel file.

Thank you for your help.

Filter_Column_Date_Modified.xaml (42.4 KB)
ASS010-AssetChanges_SCH_Last6months.xlsx (2.3 MB)

Hi,

Is your requirement to filter out rows which is older than 1 or 3 days before target date, right?
If so, the following will help you.

dt.AsEnumerable.Where(Function(r) DateTime.Parse(r("DateModified").ToString)>=targetDate.AddDays(dayOffset)).ToArray

Sample20210911-3.zip (2.2 MB)

P.S. Your workflow seems not proper handling day=“01” case : LastDay will be “00” or “0-2” and it will be thrown exception at DateTiem.ParseExact method, i think.

Regards,

Hi Yoichi,

Thans to your help. I did test your solution yet. I’ll try it nextly.

I’ll do a feedback quickly after tests.

AL BERT

1 Like

hi Yoichi,

I tested your flow, all seems OK.

But I seen in the targetDate ,this formula : new Date(2021,10,1)

I need to use this part automatically , do you know what it is the formula?

Thanks again to your help.

Al Bert

Yoichi,

I find, I just diseable this part and it’s OK. Could you confirm? Thanks a lot.

Hi,

The expression : New Date(2021,10,1) is just for test. If your target date is always today, it’s ok to delete this expression.

Regards,

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