Filtering by date
7 years 3 months ago #6050
by Ted
Filtering by date was created by Ted
I'm using event booking and have been trying to filter any old events out by using the filter
event_date > @vdSql:NOW()
but i'm getting a null result. How can I get it to only show future events?
event_date > @vdSql:NOW()
but i'm getting a null result. How can I get it to only show future events?
Please Log in to join the conversation.
7 years 3 months ago #6053
by Daniel
Thanks
Daniel
Replied by Daniel on topic Filtering by date
Hello,
Can you please try with the Mysql function enclosed with inverted commas i.e. "@vdSql:NOW()"?
Can you please try with the Mysql function enclosed with inverted commas i.e. "@vdSql:NOW()"?
Thanks
Daniel
Please Log in to join the conversation.
7 years 2 months ago #6079
by Ted
Replied by Ted on topic Filtering by date
Just seems to ignore the filter now and feeds everything
Please Log in to join the conversation.
7 years 2 months ago #6082
by Daniel
Thanks
Daniel
Replied by Daniel on topic Filtering by date
Please share your backend & FTP login credentials via Contact us form, We'll look into it.
Thanks
Daniel
Please Log in to join the conversation.
- Jan Krakora
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
7 years 2 months ago #6093
by Jan Krakora
Replied by Jan Krakora on topic Filtering by date
Hello,
I've got the similar problem. In a table there is a column with time format "Y-m-d H:i:s". And if I set column > @vdPhp:date("Y-m-d H:i:s") as a filter it works fine for a future days. But I need a current day in a feed too. I've tried @vdPhp:date("Y-m-d"), the operators "=", "IN", "LIKE", any SQL functions, but nothing works. Don't you know how can I set the filter for a current day (any time in a current day)? Or any function @vdPhp:date("Y-m-d H:i:s") minus one day?
Thanks, Jan
I've got the similar problem. In a table there is a column with time format "Y-m-d H:i:s". And if I set column > @vdPhp:date("Y-m-d H:i:s") as a filter it works fine for a future days. But I need a current day in a feed too. I've tried @vdPhp:date("Y-m-d"), the operators "=", "IN", "LIKE", any SQL functions, but nothing works. Don't you know how can I set the filter for a current day (any time in a current day)? Or any function @vdPhp:date("Y-m-d H:i:s") minus one day?
Thanks, Jan
Please Log in to join the conversation.
7 years 2 months ago #6099
by Daniel
Thanks
Daniel
Replied by Daniel on topic Filtering by date
Hello,
It seems the database column is a date-time data type. And you are comparing it with just date format, which won't return the result. You should apply two < > filters with the date followed 00:00 in time and another 23:00.
It seems the database column is a date-time data type. And you are comparing it with just date format, which won't return the result. You should apply two < > filters with the date followed 00:00 in time and another 23:00.
Thanks
Daniel
Please Log in to join the conversation.