How to display data from today() and furhter

How to filter a list to show entries from today onward.

Overview

The issue was that the original code filtered by current month only, preventing viewing of future dates.
Modify the filter condition to compare the year, month, and day, ensuring the date is greater than or equal to the current date.

Answered
dh dhuizinga1 11 Feb, 2017
Hi all,

Sorry. I made earlier an topic about this issuse but i can't find it anymore. But I've got the following issue.
I had a last list with dates which start on 20-16-17.. this list grows evertyday.

But when i want to go view this list it starts from the beginnen. Whith the code beneath (thanx Bob) i can reduce the list to THISMONTH.. But is not exactly what I need... With this code i can't view the list after thismonth... So I need something else.. I like to change it in that i want to see the list from this day (TODAY()) and further..

But I don't understand the code enough to change it in my own.. So I need a little help.. I thought that a simple change the code MONTH(NOW()) in TODAY() works.. but isnt...
<?php
setlocale(LC_TIME, "nl_NL");
?>

<?php
return array(":YEAR(`datum`) = YEAR(NOW()) && MONTH(`datum`) = MONTH(NOW())");
?>
Max_admin Max_admin 12 Feb, 2017
Answer
Hi,

Did you try
DAY(`datum`) = DAY(NOW())
?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
dh dhuizinga1 12 Feb, 2017
Hi Max,

thnx for your response... when i use your give code.. it only works when i used as:


<?php
return array(":YEAR(`datum`) = YEAR(NOW()) && DAY(`datum`) = DAY(NOW())");
?>

But when i aply.. then this results that this day.... returns in de date in every month..

How to display data from today() and furhter image 1
dh dhuizinga1 12 Feb, 2017
1 Likes
Max.... thnx for your answer....
you pushed me in the richt direction with your answer..

With the code

<?php
return array(":YEAR(`datum`) = YEAR(NOW()) && MONTH(`datum`) >= MONTH(NOW()) && DAY(`datum`) >= DAY(NOW())");
?>

get i the list that i want....

tnx again..

case closed :-)
This topic is locked and no more replies can be posted.