Filter Dataset by time

Hello,

I need your help! I created a dataset with 5 columns:

  • Start
  • Ende
  • Text1
  • Text2
  • Text3
  • Text4

In the columns Start and End I need only to enter the time but because of date format I have to insert the date to. So now the problem is that i need to filter only the time because I want to output the 4 texts when the current time is between “Start” and “Ende”. With the NOW() > Start AND NOW() < Ende its only possible to check date and time together.

Has anyone an idea? It would be very nice!
Thanks in advance!

NOW() returns mysql date format ie YYYY-MM-DD HH:MM:SS

so if your start and ende columns have the same format, then the filter you mentioned ie
NOW() > Start AND NOW() < Ende

It should correctly display your text items between the start and end date/time specified.

I guess you could use TIME() to compare only the time if the dates are not important.

thank you for the answer!

Unfortunately this did not work. Any othe ideas? I need this really …

Thank you very much in advance!

What exactly do you mean that it didn’t work?

In what format do you have your start/end columns in dataSet?

The Start and Ende colums are in String Format and with YYYY-MM-DD HH:MM:SS

When I use NOW() > Start AND NOW() < Ende in the filter it works but with TIME() > Start AND TIME() < Ende it did not work. I need this because i want to display a timetable for a busline and the times are everyday the same. So i need only the current time to check to display the next bus time.

Sorry, I should’ve explain it better, please see http://www.w3resource.com/mysql/date-and-time-functions/mysql-time-function.php

Yes!! It works now. Thank you!

If yomebody else need this, I used as filter NOW() > TIME(Start) AND NOW() < TIME(Ende)