Skip Navigation

[Resolved] Query Filter Using Dates

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you set up a View with a filter using a date field and subsequently want to change the date, the month trips back to 01-Jan when you select Edit and has to be changed every time. t's still a UNIX timestamp that is saved to the database.

Solution:
This issue is fixed in latest Views v2.5, you can update Toolset plugins to latest versions:
https://toolset.com/account/downloads/

This support ticket is created 7 years, 2 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by julieP 7 years, 1 month ago.

Assisted by: Noman.

Author
Posts
#566655
timestamp.JPG
date.JPG

I want to display posts based on a custom (date) field. There seems to be two ways of achieving this in the query filter section (please refer to the two screenshots provided).

Can you confirm what the difference is between the two filters or are they essentially the same? Is using the timestamp perhaps more efficient or better for resources?

Both are producing the expected results but I'd appreciate clarification please.

Thanks

#566724

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Julie,

Thank you for contacting Toolset support. Yes these are wyo ways and you can use any of these. I think DATE option is better since its easier to read as well and its what we normally use for Date filters.

Thank you

#567556

Hi Noman

Many thanks for clarifying. I assume that even if DATE is used, it's still a UNIX timestamp that is saved to the database? Can you confirm please?

I do agree that using DATE is easier as the format is instantly understandable however I've noticed a small but niggling issue. If you set up a View with a filter using a date field and subsequently want to change the date, the month trips back to 01-Jan when you select Edit and has to be changed every time. I did prepare a video for you but I can't upload it - sorry!

Can you confirm you're able to replicate this please?

#567604

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Yes you are correct, dates are stored as UNIX timestamp.

For the issue, I am not clear on it exactly. Can you please upload video to google drive or dropbox and share the link here, I have enabled private reply box now.

OR provide step by step screenshots of the issue so I can see and reproduce it.

Thanks

#569942

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Julie,

Thanks for sending video. I am able to reproduce this issue at my end, when I set the date (to a past date or today). I have escalated this issue to our 2nd tier support for further review and we will get back to you with an update.

Thank you for your co-operation and patience.

#579959

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Julie,

Just wanted to send an update, that this issue is fixed and will be released in the upcoming Views version. Once new Views version comes out, you can update all Toolset plugins to latest versions and confirm that this issue is fixed.

Thank you

#580261

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

This issue is fixed in latest Views v2.5, you can update plugins and confirm the issue:
https://toolset.com/download/toolset-views/

Thank you

#580813

Hi Noman

Many thanks for the update. I've updated to Views 2.5, re-tested and the issue is now resolved.

Thank you!