Shortcuts not grabbing all tasks completed in Omnifocus today

I want to run a shortcut that finds all items completed today, so I can count them and add an entry to Day One with a number and list of all my completed tasks that day. I’ve compiled the Shortcut no problem, but can’t work out why Shortcuts is only returning a handful of tasks completed (today it counted and listed 5) when I’ve completed more (easily over 20 today). I’ve tried reformatting the date but that doesn’t seem to make it work. Should Projects/Tags/Flags not be ‘ignored’ in the query but something else? Let me know if anyone has experience with this!

What time have you got specified for current date?

I think the pure date will then default to a time of midday, so if you did about 15 tasks this morning…


Here’s an example where the current date expressed just as the date part, but then used as a date time will default to noon on the current day.

I reformatted the date to yyyy-MM-dd in Shortcuts and got the same results when I tested, so I don’t think it’s that, but I can’t think what else it would be apart from the time formatting in ‘Current Date’ and how it talks to OF

But that is my point about why it would potentially not be working.

If you pass just the date in, the filter uses date AND time and will default to noon.

So if you pass in 2022-01-18, what the filter would use is 2022-01-18 12:00. Not 2022-01-18 00:00 as you might be able expecting.

Remember format and value are not always the same thing. If I say show me the date part of something that does not necessarily mean the time part of that thing no longer exists, only that I no longer see it.

Well I think I’ve sliced and diced the date/time format a couple different ways and always got the same result, but I’ll keep tinkering. Some of this does go over my head…

SOLVED: So yes adjusting the date to ‘get start of day’ first (not a date adjustment I’d tried before) fixed the issue; somewhere obviously the time stamp was screwing things up; I fell over not being sure how to parse out the timestamp myself, but the Adjust Date sorted it.