Skip Navigation

[Resolved] Date filtering in views for custom Date Field not working

This support ticket is created 3 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by larryL 3 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1783669

I have a custom date/time field and I am trying to create a view that only displays posts that have dates in that field from 'today'. Whenever I select that field in the views filter and select 'today' nothing shows up. I've tried 'unsigned' as other supporters have suggested. No options (I think I have tried them all) have worked.

#1784741

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Larry,

Thank you for getting in touch.

When you use the option Today() you will only get posts that have their custom fields set to the literal date of Today's date rather than the day itself.

However the filter on the view should be set to a number equal to TODAY.

Please send me a screenshot of your query filter settings so that I can have a look.

Thanks,
Shane

#1784959
filter.PNG

Here is one of the filters I tried. But I tried almost ALL of the available options in that filter box. I still got zero results.

#1786091

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Larry,

Assuming that Work Start is a datepicker field then the value is being stored as a Timestamp. So you will need to set it to A number instead of Datetime.

If you tried this and it still doesn't work. Please provide admin access to the website as well as a link to the page where this view is on so that I can have a more detailed look.

Thanks,
Shane

#1789547

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Larry,

Thank you for the credentials.

However when I try to log in, it is saying Invalid username.

Can you try the credentials and let me know if they work for you.

Thanks,
Shane

#1791717

It looks like someone deleted. I've readded it. Try now.

#1793111

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Larry,

Not sure how active this site is as i'm seeing that its an intranet site.

However I've setup the filters to get the date value of today and tomorrow.

So the filter is set to filter for dates timestamp that are equal to or greater than or less than tomorrow. So it should only show the posts for today only.

I've also added a test time to show this.
hidden link

Here is my test hidden link

Please let me know if everything is ok now.

Thanks,
Shane

#1794999

You're correct. It's an intranet.

So it is kinda working. But it looks like it's basing it on server time which I'll have to fix on my own...

So if I were to create multiple views similar to the one that is there now, could I create one for days of the week then IOW, one view to display posts for monday, another for tuesday, etc... based upon the current week?

Thanks!

#1796023

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Larry,

Unfortunately no you won't able to setup the date filter for specific days of the week.
https://toolset.com/documentation/user-guides/views/date-filters/
Based on what filters are available for the Date you won't be able to do this.

You are only able to do it based on the current day, or future days as well as the other items that apply to date filters.
Thanks,
Shane

#1796531

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.