# Filter HubDB data based on today's date

**URL:** <https://community.hubspot.com/t/filter-hubdb-data-based-on-todays-date/2912>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [August 2, 2017, 12:20pm UTC](https://community.hubspot.com/t/filter-hubdb-data-based-on-todays-date/2912 "2017-08-02T12:20:05Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![jasonvanpelt](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasonvanpelt/32/75439_2.png) [@jasonvanpelt](https://community.hubspot.com/u/jasonvanpelt)\
**Post date:** [September 27, 2019, 4:40pm UTC](https://community.hubspot.com/t/filter-hubdb-data-based-on-todays-date/2912/9 "2019-09-27T16:40:24Z")

</div>

Rather than filtering by date in your for loop, it is better to filter the query itself

{% set queryparam = “&orderBy=start\_date” %}  
{% set queryparam = queryparam + “&event\_start\_date\_\_gt=” + local\_dt|unixtimestamp %}  
{% set table = hubdb\_table\_rows(XXXXXX, queryparam) %}

This helps in scenarios where you might only want to show a limited # of results \>= today’s date -- say a list of the next 3 upcoming on your homepage, not ALL upcoming.

---

_[View the full topic](https://community.hubspot.com/t/filter-hubdb-data-based-on-todays-date/2912)._
