# Hubdb Filter on Date

**URL:** <https://community.hubspot.com/t/hubdb-filter-on-date/26066>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [September 28, 2020, 3:30pm UTC](https://community.hubspot.com/t/hubdb-filter-on-date/26066 "2020-09-28T15:30:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohansdeeson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rohansdeeson/32/2679_2.png) [@rohansdeeson](https://community.hubspot.com/u/rohansdeeson)\
**Post date:** [September 28, 2020, 3:30pm UTC](https://community.hubspot.com/t/hubdb-filter-on-date/26066/1 "2020-09-28T15:30:37Z")

</div>

I Have a table of bookings with a date time column. called scheduled.

I want to get out the rows that are in the future I’m trying to do the following but I get an error about it being a string rather than a date can anyone help with this.

```lia-code-sample
{% set queryparam = "&scheduled__gt=" + local_dt|unixtimestamp %}
{% set allBookingsFuture = hubdb_table_rows('session_bookings',queryparam) %}

```

---

<div class="post-metadata">

**Author:** ![BarryGrennan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/barrygrennan/32/97794_2.png) [@BarryGrennan](https://community.hubspot.com/u/BarryGrennan)\
**Post date:** [September 28, 2020, 6:38pm UTC](https://community.hubspot.com/t/hubdb-filter-on-date/26066/2 "2020-09-28T18:38:29Z")

</div>

Hi Rohan,

Out of interest I tried to replicate your problem. But your code worked perfectly for me. The only way I could generate an error was if I tried to use the gt filter on a text field. Then the exact error I got was:

“BadRequestException: error when listing rows for table 8675309 for portal 90210: Filter ‘gt’ is not supported for the column type ‘TEXT’”

Out of interest Is that the same error you’re getting? If not, maybe you could copy/paste it or screencap it so we can try to replicate.

If you are getting the above error it’d seem that your column “scheduled” isn’t a date/time field. Which is odd.

Have you tried it out with a fresh test database?

---

<div class="post-metadata">

**Author:** ![rohansdeeson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rohansdeeson/32/2679_2.png) [@rohansdeeson](https://community.hubspot.com/u/rohansdeeson)\
**Post date:** [September 29, 2020, 5:35am UTC](https://community.hubspot.com/t/hubdb-filter-on-date/26066/3 "2020-09-29T05:35:14Z")

</div>

Barry it turned out there was an issue on a different line, but the designer was incorrectly reporting it on this line.

Which was throwing us out completely

---

<div class="post-metadata">

**Author:** ![BarryGrennan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/barrygrennan/32/97794_2.png) [@BarryGrennan](https://community.hubspot.com/u/BarryGrennan)\
**Post date:** [September 29, 2020, 2:04pm UTC](https://community.hubspot.com/t/hubdb-filter-on-date/26066/4 "2020-09-29T14:04:41Z")

</div>

Glad to hear you got it sorted out!
