# How to create a range between two dates

**URL:** <https://forum.bubble.io/t/how-to-create-a-range-between-two-dates/175972>\
**Category:** Database\
**Created:** [October 29, 2021, 9:55am UTC](https://forum.bubble.io/t/how-to-create-a-range-between-two-dates/175972 "2021-10-29T09:55:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abaudin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/abaudin/32/43062_2.png) [@abaudin](https://forum.bubble.io/u/abaudin)\
**Post date:** [October 29, 2021, 9:55am UTC](https://forum.bubble.io/t/how-to-create-a-range-between-two-dates/175972/1 "2021-10-29T09:55:26Z")

</div>

Hello.  
How to create a range between two dates ?

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/6/c/6cc4954bdbe83b1c70489ed34d03676e22093895.png)  
???

Thanks

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [October 29, 2021, 10:15am UTC](https://forum.bubble.io/t/how-to-create-a-range-between-two-dates/175972/2 "2021-10-29T10:15:31Z")

</div>

I have 2 questions

How is ranger defined in the data tab

Are you sure dateStart/dateEnd are date fields in your data tab

You should be able to do this all in 1 step also. Probably No need to modify the record you just created. You can set range when you create the event.

---

<div class="post-metadata">

**Author:** ![brenton.strine](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/brenton.strine/32/124156_2.png) [@brenton.strine](https://forum.bubble.io/u/brenton.strine)\
**Post date:** [July 31, 2023, 7:30pm UTC](https://forum.bubble.io/t/how-to-create-a-range-between-two-dates/175972/3 "2023-07-31T19:30:52Z")

</div>

Solution:

Put the first date in the expression, then use the `<- range ->` operator, then put the second date. It will automatically create a range between the older and newer dates.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/6/7/67e1778d44916c3105a405e13fdc6685ca3d6baa.png)

Documentation:

> **[Operators and comparisons](https://manual.bubble.io/core-resources/data/operations-and-comparisons#less-than-range-greater-than-1)**
