We're aware that some date based queries are not calculating, and we believe this is caused by improperly formatted dates being added to some date fields. If your report doesn't run, then you can instead target the report using wildcards:
Using Wildcards In Action Network Reports & Queries.
What Can I Do With Date Fields In Action Network Queries & Reports?
Using date-based field in Action Network allows you to target activists based on a field value being equal to, greater than or less than a specified date using values like this:
- YYYY/MM/DD: Will target activists based on a field value equal to the date you set. So 2019/07/01 will look for and return all activists with the date 2019/07/01 in the field you're targeting.
- >>YYYY/MM/DD: The >> condition tells Action Network that you are seeking values greater than the one specified.
- <<YYYY/MM/DD: The << condition tells Action Network that you are seeking values less than the one specified.
All date fields are read as YYYY/MM/DD HH:MM:SS even where no time is entered. So targeting by YYYY:MM:DD using >> or << can be thought of as targeting based on midnight on that date. So >>2021/01/15 will target all dates values including and after 2021/01/15, and <<2021/01/15 will target all dates earlier than 2021/01/15.
Dates in Action Network, whether populated by AN or as part of the Green Party Custom Fields are all in the format YYYY/MM/DD. If you create any Custom Fields yourself which you may later want to include in date-based queries or reports you should also use this format. The reason dates are stored in this format is to allow for date and time based filtering on reports. The calculations used for date and time-based queries rely on field values being entered in this format so will give inaccurate results if another date format is used.
It may be confusing for respondents to have to use a different date format when completing an Action Network form- so if you use a text-field for date entry in a form why not set an email alert when somebody responds so you can go in and amend the date format if needed.
Example Query: All Local Party Members Who Have Joined Since A Given Date
To target anyone who has joined the party since a given date you just need to filter on two conditions:
- Field Value- Include Local_Party with value Local Party Name.
- Field Value- Include Membership_Join_Date with value >>YYYY/MM/DD
You can of course add additional filters if you want to narrow down your results. For example, by adding a filter that targets based on a Membership_Status value of Current.
If you want to target all members, and not just those who are subscribed to email, just make sure to select all of the options in the Email Subscription Status box below the Query Builder.
When selecting the fields you want to display in the report you may want to add the date field you're targeting, so in this example we've added the Membership_Join_Date field. We've also added in fields to show their Email Subscription Status and Email Subscription Update Time to see when they were subscribed to the local party's Group.
Example Query: All Local Party Members Who Have Joined Since A Given Date And Subscribed To Your Group On Another
If you or a member of the Digital Team has added members to your Group, or if you want to track people moving into your local party area you can target members by adding an additional filter on their Email Subscription Date. If you only want to track people being added to your Group you should select only Subscribed in the Email Subscription Status box below the Query Builder.