# DateRange end is off by one second when using Date picker UI

**URL:** <https://community.fibery.io/t/daterange-end-is-off-by-one-second-when-using-date-picker-ui/6376>\
**Category:** Bugs & Issues\
**Created:** [July 9, 2024, 10:47pm UTC](https://community.fibery.io/t/daterange-end-is-off-by-one-second-when-using-date-picker-ui/6376 "2024-07-09T22:47:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [July 9, 2024, 10:47pm UTC](https://community.fibery.io/t/daterange-end-is-off-by-one-second-when-using-date-picker-ui/6376/1 "2024-07-09T22:47:13Z")

</div>

I have a “Reporting Period” DB whose entities define Date ranges, and they collectively comprise a complete range of time, separated into mutually-exclusive, non-overlapping ranges that abut each other; so any given timestamp is guaranteed to “belong to” no more than one Period.

Thus each Period’s date range must _begin_ exactly where the previous Period’s range _ends_. Successive ranges can’t overlap, and they can’t have any gap between them.

Then I have:

> _someDB → links to a Period entity_
> 
> _otherDB_ → contains a `Timestamp` Date field

In the context of a particular _`someDB`_ entity, associated with a specific date range, I have a Formula to find/filter the _`otherDB`_ entities whose timestamp falls within this date-range:

```auto
OtherDB.Filter(
    [Timestamp] >= [Step 1 someDB].[Period].Start() and
    [Timestamp] < [Step 1 someDB].[Period].End()
)

```

**However** , when manually setting a Date Range field, the Fibery Date picker UI apparently adds one second to the user-specified end time, resulting in a 1-second overlap between these Periods that need to be mutually exclusive:

> ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/7/72e2284301ce024bb7711d8348a65b0b8d041c8f.png)

This makes it impossible to manually create a set of Periods/Date Ranges that comprehensively cover a range of time _and do not overlap_.

Scripts apparently do not suffer from this issue.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [July 10, 2024, 5:02am UTC](https://community.fibery.io/t/daterange-end-is-off-by-one-second-when-using-date-picker-ui/6376/2 "2024-07-10T05:02:52Z")

</div>

[https://the.fibery.io/@public/User\_Guide/Guide/Date-Ranges-in-Formulas-42/anchor=What-about-date-time-ranges--74f8c8fc-5859-4a39-bd3a-c3db4ba8e14c](https://the.fibery.io/@public/User_Guide/Guide/Date-Ranges-in-Formulas-42/anchor=What-about-date-time-ranges--74f8c8fc-5859-4a39-bd3a-c3db4ba8e14c)

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [January 30, 2025, 9:33pm UTC](https://community.fibery.io/t/daterange-end-is-off-by-one-second-when-using-date-picker-ui/6376/3 "2025-01-30T21:33:57Z")

</div>


