# Tag History Binding Start/End Date Expressions not Working as Expected

**URL:** <https://forum.inductiveautomation.com/t/tag-history-binding-start-end-date-expressions-not-working-as-expected/86141>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [February 21, 2024, 9:50pm UTC](https://forum.inductiveautomation.com/t/tag-history-binding-start-end-date-expressions-not-working-as-expected/86141 "2024-02-21T21:50:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shawn\_Rieger1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shawn_rieger1/32/57040_2.png) [@Shawn\_Rieger1](https://forum.inductiveautomation.com/u/Shawn_Rieger1)\
**Post date:** [February 21, 2024, 9:50pm UTC](https://forum.inductiveautomation.com/t/tag-history-binding-start-end-date-expressions-not-working-as-expected/86141/1 "2024-02-21T21:50:07Z")

</div>

Im having an issue using the start and end date bindings for historical tag binding. When referencing these custom properties or even directly binding to date picker value, this does not work. I get a single row back from the current day. Is there any way to see how the binding is interpreting this date? When I switch to realtime I have no issues with bindings. There is is plenty of data for this tag for the query range and should return data.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/2/32dfde50df4b0aee5f052a5e9fd4551f1d83c548.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/e/6e6ca8b3f3b1bcad3b661bc153fb5d00d913edb4.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 21, 2024, 10:18pm UTC](https://forum.inductiveautomation.com/t/tag-history-binding-start-end-date-expressions-not-working-as-expected/86141/2 "2024-02-21T22:18:07Z")

</div>

Try "Tall" return format. Look for a return size argument. (Make it -1.)

---

<div class="post-metadata">

**Author:** ![srinivasan\_s](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@srinivasan\_s](https://forum.inductiveautomation.com/u/srinivasan_s)\
**Post date:** [July 29, 2024, 9:28am UTC](https://forum.inductiveautomation.com/t/tag-history-binding-start-end-date-expressions-not-working-as-expected/86141/4 "2024-07-29T09:28:06Z")

</div>

Hey pturmel, I was facing same issue.  
I am using start and end date as custom method, that was getting values from db. Here is the expression.

 ![end](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/6/767f038fdb5ecddb2f3872c29fee776a68e06052.png)  
 ![strt](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/3/43e87a5edc015fa5686899ec25bf2b731676e39e.png)  
it does not throwing any data. Kindly help.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 29, 2024, 11:38am UTC](https://forum.inductiveautomation.com/t/tag-history-binding-start-end-date-expressions-not-working-as-expected/86141/5 "2024-07-29T11:38:29Z")

</div>

Why are you formatting your datetime objects as strings? That makes them not datetime values any more, but strings. History bindings and history queries need the datetime objects themselves.

A string that **looks** like a date and time is not a date and time for code purposes.

---

<div class="post-metadata">

**Author:** ![srinivasan\_s](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@srinivasan\_s](https://forum.inductiveautomation.com/u/srinivasan_s)\
**Post date:** [July 30, 2024, 9:28am UTC](https://forum.inductiveautomation.com/t/tag-history-binding-start-end-date-expressions-not-working-as-expected/86141/6 "2024-07-30T09:28:14Z")

</div>

Thank you . Noted
