# Show row before current date

**URL:** <https://community.hubspot.com/t/show-row-before-current-date/47578>\
**Category:** CMS Development\
**Created:** [November 25, 2021, 2:49pm UTC](https://community.hubspot.com/t/show-row-before-current-date/47578 "2021-11-25T14:49:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pm8rsh88](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pm8rsh88/32/78471_2.png) [@pm8rsh88](https://community.hubspot.com/u/pm8rsh88)\
**Post date:** [November 25, 2021, 2:49pm UTC](https://community.hubspot.com/t/show-row-before-current-date/47578/1 "2021-11-25T14:49:31Z")

</div>

Hi,

I’ve done a few searches, so forgive me if this has been answered before.

I managed to find the code below, which seems to be the reverse of what I need.

In my HubDB I have a column called date. I want all rows in the past to display, but all rows in the future not to. The code I am using below displays future posts but not past ones. Am I missing something simple?

`{% set queryparam = "&date__gt=" + local_dt|unixtimestamp %}`

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [November 25, 2021, 4:48pm UTC](https://community.hubspot.com/t/show-row-before-current-date/47578/2 "2021-11-25T16:48:26Z")

</div>

Unixtime goes up from 00:00:00 UTC on 1 January 1970, so your query is looking for rows with a date greater than the local date time, as in, dates in the future. Change `date__gt` (i.e. date is greater than) to `date__lt` (date is less than).

```lia-code-sample
{% set queryparam = "&date__lt=" + local_dt|unixtimestamp %}

```
