Forum Academy Marketplace Showcase Pricing Features

Filtering based on date only, not time

Hi,

Hopefully a quick one. Whenever I store a date without picking a specific time it stores both the date and the time as 12:00 - doesn’t matter if I just format as date only.

Then when I want to filter results in a repeating group, and I want to just pick records on say today, it doesn’t return any results, even though there are records with todays date.

My assumption is because in my method using current date/time the date matches, but the time doesn’t match because it is not 12:00 - but can find the method to resolve.

Help appreciated.

Neil

Hey @neilgellett :wave:

I think you are correct!

There are a few different ways to do this. You can save the fields in the database by date rounded down to day. Or…

If your data actually says 12:00am midnight. You can just try what you have but rounded down to day.

What I sometimes do is just create two constraints.

When >= Current date/time rounded to day.

&

When < Current date/time rounded to day (+ day) 1.

Would that work for what you are looking for?

Hope that helps! :blush:

@j805 www.NoCodeMinute.com

For All Your No-Code Education Needs:

1 Like

@dave13

This is what I was thinking of earlier. Less steps than What we did.

1 Like

I used ‘change hours to 0, change minutes to 0 and change seconds to 0’ on both saving date and using current date as a search parameter :slight_smile:

Thank you for the reply. You method worked perfect.

1 Like

Thanks for the reply. Its amazing how all the solutions proposed here work, Thanks once again

1 Like

Works perfect!