# Expression Binding - If statement to control historical trend end date

**URL:** <https://forum.inductiveautomation.com/t/expression-binding-if-statement-to-control-historical-trend-end-date/107896>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [June 27, 2025, 7:09pm UTC](https://forum.inductiveautomation.com/t/expression-binding-if-statement-to-control-historical-trend-end-date/107896 "2025-06-27T19:09:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://forum.inductiveautomation.com/u/warren)\
**Post date:** [June 27, 2025, 7:09pm UTC](https://forum.inductiveautomation.com/t/expression-binding-if-statement-to-control-historical-trend-end-date/107896/1 "2025-06-27T19:09:28Z")

</div>

I'm running a vision client with Easy Chart's do display specific data over time, in a historical mode.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/d/5db426537105b863bda4b6036d81682b704a57b4.png)

These historical easy chart's have a start date bound to a memory tag. A button on the screen to "start process" grabs the system.date.now() and throws it into a memory tag mentioned above.

The easy chart's end date is currently bound through an expression reading:

now(1000)

So essentially, I trigger the start, and the end time updates perpetually at the rate above.

Now I need to stop this end date, based on specific events, like abort, or process finished.

The logic would look like below, but I need it to agree with an expression binding syntax:

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

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [June 27, 2025, 7:14pm UTC](https://forum.inductiveautomation.com/t/expression-binding-if-statement-to-control-historical-trend-end-date/107896/2 "2025-06-27T19:14:02Z")

</div>

Try

```python
if(
    !{[default]Internal/Trending/Stop Trend.value},
    now(1000),
    {[default]Internal/Trending/Stop Trend.timestamp}
)

```

---

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://forum.inductiveautomation.com/u/warren)\
**Post date:** [June 27, 2025, 7:29pm UTC](https://forum.inductiveautomation.com/t/expression-binding-if-statement-to-control-historical-trend-end-date/107896/3 "2025-06-27T19:29:30Z")

</div>

Thank you!
