HTML5 Data Bindings Formatter Support Product Page

Filter Events for only todays date and beyond

Asked 20 Oct 2013 08:36:28
3
have this question
20 Oct 2013 08:36:28 Robert Edwards posted:
Hello
The new database tools are excellent - well done. I am trying to filter a list of events which contains dates eg 2013-03-15 so that only events greater than or equal to today's date are shown. I cannot find a way to do this. I have tried Database Source Query Builder - Filter tab. I have selected my dates field and >= but do not know what to use in the following two boxes.
Best wishes
Robert

Replies

Replied 01 Feb 2014 00:01:01
01 Feb 2014 00:01:01 Steve Skinner replied:
There should be a way to do this with the new tools. I agree. I've done this using DW recordsets, but the syntax and code is all different with the "new way" with these new DMXzone extensions.

For example, I have a customer site where I show events that are upcoming - using whatever the current date is as a starting point. The code to create this filter in the SQL looks like this:

SELECT * FROM db.events WHERE eventDateField > GETDATE()-1 ORDER BY eventDateField ASC


I just don't know how to implement a such a filter using the new Data Sources filter....

It would be great if the DMXzone guys would show us how to do this!
Replied 01 Feb 2014 11:23:02
01 Feb 2014 11:23:02 Teodor Kuduschiev replied:
Hello Robert, Steve,

You can use: now in the filters tab, for today's value.
This reply was removed on 2/2/2014 1:16:05 AM.
See the changelog
Replied 02 Feb 2014 01:15:40
02 Feb 2014 01:15:40 Steve Skinner replied:
I could not get this to work.

I set up a filter on a date field, and chose entered value and >= and then entered now in the box for the entered value. I know there are 4 results that should show up, but it doesn't produce any results.

I checked with the DMXzone updater to make sure I have the latest versions of all the extension too.

Any idea on why t doesn't work?
Replied 03 Feb 2014 11:47:07
03 Feb 2014 11:47:07 Teodor Kuduschiev replied:
Hi Steve,
Can you please provide a link to your page, where we can check this? Just tested this locally and seems to be working just fine:
Replied 03 Feb 2014 16:55:34
03 Feb 2014 16:55:34 Steve Skinner replied:
Hi Teodor, I've emailed you a link to my page. It's not really a page I want listed publicly. I have emailed my page to you directly.
Replied 03 Aug 2015 10:02:28
03 Aug 2015 10:02:28 Greta Garberini replied:
This did not work for me, since it seems that DATE in mysql assumes a value of minutes and seconds as 00:00:00.

Thus "now" for eg. 2015-08-03 actually is interpreted as 2015-08-03 00:00:00, so a "now" is quickly past tense. Am I wrong here?
Anyway, if I need to filter an event from today (the whole 24 hours), for me it only works with a parameter "today" instead of "now".

Reply to this topic