# Refreshing a variable returning the current date

**URL:** <https://community.appfarm.io/t/refreshing-a-variable-returning-the-current-date/1990>\
**Category:** Ask the community\
**Tags:** app-data\
**Created:** [September 1, 2025, 11:35am UTC](https://community.appfarm.io/t/refreshing-a-variable-returning-the-current-date/1990 "2025-09-01T11:35:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joanna](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/joanna/32/122_2.png) [@Joanna](https://community.appfarm.io/u/Joanna)\
**Post date:** [September 1, 2025, 11:35am UTC](https://community.appfarm.io/t/refreshing-a-variable-returning-the-current-date/1990/1 "2025-09-01T11:35:06Z")

</div>

Hi! We have an app variable of type function that returns the current date:

`return moment().toISOString()`

Is there a way to force the variable to update (for instance, once a minute), without building a separate layer of logic to refresh it manually?

---

<div class="post-metadata">

**Author:** ![Simona](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/simona/32/201_2.png) [@Simona](https://community.appfarm.io/u/Simona)\
**Post date:** [September 1, 2025, 12:49pm UTC](https://community.appfarm.io/t/refreshing-a-variable-returning-the-current-date/1990/2 "2025-09-01T12:49:10Z")

</div>

Hi @Joanna,

As far as I know, the only way to achieve this is by using a [timer](https://docs.appfarm.io/appcademy/appfarm-professional/logic-and-flow/logical-concepts#timers).

If you add a timer to trigger at a chosen interval (for example, every 60 seconds), you can then create an action that updates your app variable accordingly.

---

<div class="post-metadata">

**Author:** ![Joanna](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/joanna/32/122_2.png) [@Joanna](https://community.appfarm.io/u/Joanna)\
**Post date:** [September 1, 2025, 1:22pm UTC](https://community.appfarm.io/t/refreshing-a-variable-returning-the-current-date/1990/3 "2025-09-01T13:22:47Z")

</div>

Thank you, @Simona, that works for our case 👌
