Filter on datetime condition not working

Hello Everyone!

I read articles on how filters work and had almost no issue until now.
My automated flow is very simple, I have a 100 of excel sheets with single entries and I want these entries to be copied to a general google sheet once a week.
In order to exclude duplicates from the process, I am telling Make to copy these entries only if they refer to the previous 7 days. When launching the call, today for example, also entries from the 10th of February are included and copied (Filter Inspector screenshots attached).

I have explained briefly the situation in this video https://www.loom.com/share/a818955c4a264fcda6628dac25fc9225. Already tried to check the format of my date in the google sheet (from automatic to date) and nothing changes. Every suggestion or alternative on how to do this process is welcome, many thanks in advance!




Hi Michelangelo,
just to keep everything in order in here as well, as I explained in the ticket, Google Sheets usually returns a date as a string, meaning that when you want to compare the date against for example the “now” variable, you need to use parseDate function to parse the string and create a date.

Additionally, when parsing the date, the correct datetime structure needs to be specified in the function, when Google Sheets returns DD/MM/YYYY, you need to use this format in the function as well.

Have a nice day :slightly_smiling_face:
David P.

1 Like

Hello David, thanks for your help. Using your approach, what should be the formula if Google Sheets presents the following format? → 3/6/2023 20:07:09

Hello Michelangelo,

that depends whether the value is indeed a date or not, you can check it inside the module from the output.
When you open the output bundle via the highlighted button, you should see the date value in the JSON bundle content:

In case the date looks like this: “2023-03-08T08:36:44.712Z” then you do not need to use parseDate and can use the date itself in the filter without any functions:

I hope that clarifies it a bit more :slight_smile:

1 Like

Uhmm, this one is the execution of yesterday blocked by the date filter

Bundle 1

  • Timestamp (A)

3/6/2023 17:33:25

I have this formula in order to select which records should be moved: parseDate(1. Timestamp (A);MM/DD/YYYY) > adddays(now;-1)

I don’t understand this second scenario why it is not working, thank you

Okay, I have just put only one M, m/dd/yyyy, and it worked…Thank you!

2 Likes

The small mm is for minutes and the capital MM is for Months.

1 Like