# Date Range

**URL:** <https://community.hubspot.com/t/date-range/64999>\
**Category:** CMS Development\
**Created:** [September 13, 2022, 2:15pm UTC](https://community.hubspot.com/t/date-range/64999 "2022-09-13T14:15:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DBarro](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dbarro/32/9089_2.png) [@DBarro](https://community.hubspot.com/u/DBarro)\
**Post date:** [September 13, 2022, 2:15pm UTC](https://community.hubspot.com/t/date-range/64999/1 "2022-09-13T14:15:49Z")

</div>

Hi everyone,  
I am trying to get those tickets and I am having issues pulling those tickets in between those two dates (start\_date and end\_date)  
here is my query  
{% set tickets = crm\_associations(companyID, “HUBSPOT\_DEFINED”, 25, “limit=100&createdate\_\_gte=”~start\_date~“&createdate\_\_lte=”~end\_date, “id,subject,createdate,hs\_created\_by\_user\_id”,false) %}  
not sure what I’m missing here.with this one {% set tickets = crm\_associations(companyID, “HUBSPOT\_DEFINED”, 25, “limit=100”, “id,subject,createdate,hs\_created\_by\_user\_id”,false) %} , I don’t have a problem, but I want to set a date range

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 15, 2022, 6:23pm UTC](https://community.hubspot.com/t/date-range/64999/2 "2022-09-15T18:23:54Z")

</div>

Hi, @DBarro 👋 Thanks for your question! Hey, @dannio @mangelet, do you have any thoughts on how @DBarro can structure their request?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![dannio](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dannio/32/95715_2.png) [@dannio](https://community.hubspot.com/u/dannio)\
**Post date:** [September 16, 2022, 6:44am UTC](https://community.hubspot.com/t/date-range/64999/3 "2022-09-16T06:44:08Z")

</div>

@DBarro what format are you using for the start and end dates? I suspect you might not be using a timestamp in your query. Can you try again after you convert the time into a timestamp?

> **[HubL filters - HubSpot docs](https://developers.hubspot.com/docs/cms/reference/hubl/filters)**
>
> HubL filter list and examples for HubSpot CMS developers.

`{{ start_date|unixtimestamp }}`
