Get Between Date data (DateDiff)

Hello. I want to scrapping Email,Data extra… by between date.
On working day, get data from -3days until today.
For instance, if the project works on Monday, get Friday-Sunday data.

I think, Using Datediff is the best. But I don’t know how add use Now.AddDays~ on Datediff


This make errors… Help me


Can you share output which you expect in details? Do you need array of DateTime such as {2021/11/5, 2021/11/4, 2021/11/3, 2021/11/2}?


For today, I want to get emails arrived at 2021/11/4,2021/11/3,2021/11/2
For next monday 2021/11/8, I want to get emails arrived at 2021/11/7, 2021/11/6, 2021/11/5
So working date will be changed, so I don’t want to use exact date.
I want to use code like Now.Adddays(-3)

Do you understand?


If we use Outlook, we can use filter as the following document.

The filter settings will be

"[Received] >= '" + DateTime.Today.AddDays(-3).ToString("d") + " 00:00AM'"


Ahhh~ If I use Filter Data Table, Is this right???
Get -3,-2,-1 date data?

And Receive Date <“yyyy-MM-dd”)
Could be possible instead of <= Now.AddDays(-1).Tostring(“yyyy-MM-dd”)


First, please remove .ToString method in Column settings.

If “Received Date” column has yyyy-MM-dd style format string, the above will work.
Perhaps you should try it in actual.


It has yyyy-MM-dd Format.

As I remember you helped me before. Thank you at all times.
Have a good day :slight_smile:

1 Like

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