The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Filter for Today's Date

Labels

This Discussion is public

Notifications

I have a form my clients fill out each day. I want a view that will show me just the entries from the current day. I have tried all versions of NOW and I can't get it to work. Anyone know how to do this?

Hello,

Assuming "Entry Creation Date" is "equal to" NOW doesn't work, with no other filters,

Try this:

Add a function to your themes function file:

function displayTodaysDate( $atts )
{
return date(get_option('date_format'));
}
add_shortcode( 'datetoday', 'displayTodaysDate');

Create a link in your view in the Before Content section to the URL where your view is displayed. Add "?date=[datetoday]" to the end of the link.

Now in your view add a filter for "Entry Creation Date" is "equal to" [get param=date]. Unfortunately you will have to click the link. As you learn it you can manipulate the URL to get the results you want without clicking the link.

Note: You may have to play with the date format -> http://php.net/manual/en/function.date.php

Discussion closed.