# Current Time for Indicator Block

**URL:** <https://forums.losant.com/t/current-time-for-indicator-block/5423>\
**Category:** Help\
**Tags:** experience\
**Created:** [February 21, 2024, 10:24pm UTC](https://forums.losant.com/t/current-time-for-indicator-block/5423 "2024-02-21T22:24:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Hart](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@John\_Hart](https://forums.losant.com/u/John_Hart)\
**Post date:** [February 21, 2024, 10:24pm UTC](https://forums.losant.com/t/current-time-for-indicator-block/5423/1 "2024-02-21T22:24:59Z")

</div>

I currently have an Edit Indicator on my dashboard and I display the last time my device state was updated:

> Last Updated  
> {{formatDate time-0 ‘MM/DD/YY h:mm A’}}

This works well. However, I would like to change the background color to red if the state change was over 60 minutes ago.

How do I subtract time-0 from current time?

> {{subtract {{currentDateTime ‘x’}} {{time-0}} }} \> 3600000

Thank you in advance,  
John

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [February 22, 2024, 3:14pm UTC](https://forums.losant.com/t/current-time-for-indicator-block/5423/2 "2024-02-22T15:14:58Z")

</div>

You want to use a [subexpression](https://handlebarsjs.com/guide/expressions.html#subexpressions) for this:

```hb
{{subtract (currentDateTime 'x') time-0}} > 3600000

```

---

<div class="post-metadata">

**Author:** ![John\_Hart](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@John\_Hart](https://forums.losant.com/u/John_Hart)\
**Post date:** [February 22, 2024, 7:08pm UTC](https://forums.losant.com/t/current-time-for-indicator-block/5423/3 "2024-02-22T19:08:18Z")

</div>

That worked! Thank you!
