Items by multiple column values date and time


I’m trying to get all the items at a certain date at a certain time. The following query works for date:

query {items_by_multiple_column_values (board_id: 708469745, column_id: \"date\", column_values: \"2022-01-03\") {name column_values{title text} group{title}}}

But I’m also trying to do this with time:

query {items_by_multiple_column_values (board_id: 708469745, column_id: \"date\", column_values: \"2022-01-03 13:00\") {name column_values{title text} group{title}}}

This doesn’t seem to work, but when I just get everything date and time is formatted like this:

Does anyone know how I would get items by date and time?

Thanks a lot!

Hi @IanZuiderent

I’m affraid the time component of the date column isn’t supported by items_by_multiple_column_values. Even when you add time to a date you will not find the item on just the date. When you are testing that you have to give it a minute to be sure it is updated in the backend. I tested it with two items with the same date (returned by the call) and after I added time to one of the dates it disappeared from the return array.

Probably worth a feature request.

Hi @basdebruin

Thank you for your reply. The reason I’ve asked this is because I want to get every item this week. But when I get the top 100 items it will get the top 100 newest created. The problem with this is when I make an item for next year I most likely won’t get it back from the API next year. This is because there has been more than 100 newer items created in this year. My idea to work around this was to use multiple column values to get every date this week. But as you know, this won’t work for items with a time.

Do you happen to know an alternative way to do this?

Thanks a lot!

Hi @IanZuiderent
I don’t fully understand why you would get only 100 items. Did you gave it a limit?

@basdebruin Because loading times will increase a LOT. A limit of 100 items will return me a JSON in 7,32 seconds. A limit of 200 items will return me a JSON in 10,11 seconds. A limit of 500 items won’t even load.


Does your board have mirror columns?

I have found that when a board has mirror columns the time to return the query if you include the mirror columns is what you described. Also, if you specify the columns to return (and exclude the mirror columns) this issue goes away.

Jim - Subscribe to The Monday Man
Watch Our Latest Video: Quick Tip - The Trick to Editing Custom Automations

1 Like

@JCorrell It does have mirror columns, yes. How would I specify the return columns? I’ve tried the filter argument but it returns:

"message": "Field 'items' doesn't accept argument 'filter'",

I’m just using items now to get everything.

I seem to have found the answer myself in another post. Thank you @JCorrell and @basdebruin for the help!

For anyone that has the same problem, here is the link to the post that answered my question: