# \[Solved\] Indicator Block Time Condition

**URL:** <https://forums.losant.com/t/solved-indicator-block-time-condition/953>\
**Category:** Help\
**Created:** [May 31, 2018, 2:41pm UTC](https://forums.losant.com/t/solved-indicator-block-time-condition/953 "2018-05-31T14:41:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryan\_Fleckenstein](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/bryan_fleckenstein/32/603_2.png) [@Bryan\_Fleckenstein](https://forums.losant.com/u/Bryan_Fleckenstein)\
**Post date:** [May 31, 2018, 2:41pm UTC](https://forums.losant.com/t/solved-indicator-block-time-condition/953/1 "2018-05-31T14:41:32Z")

</div>

New to the platform, and I’m having a bit of an issue trying to evaluate a condition based on time for the indicator block. I’m wondering if the following are even possible with this block. Any clues to get me in the right direction would help:

1. Can I evaluate the {time-1} variable based on whether or not it’s past a certain time, e.g. 5p? I know it returns the date/time in milliseconds, so seems like some conversion is necessary.

2. If not, I tried to create a new workflow with the gauge query to store the result of one of the devices attributes in the hopes this might get me closer. I get payload data of “myObject”: “value”: true “time” : Thu May 31, 2018 09:37:10 GMT-04:00. I can’t, however, seem to pull that info into the condition expression or label for evaluation.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [May 31, 2018, 2:59pm UTC](https://forums.losant.com/t/solved-indicator-block-time-condition/953/2 "2018-05-31T14:59:11Z")

</div>

You can accomplish this by adding conditions in the following format:

```auto
{{formatDate time-0 'HH'}} > 17

```

The above expression will format the time as only the hour-of-day between 0-23. We can then compare that against 17 (5p in 24 hour time).

Here’s our documentation for other [available helpers](https://docs.losant.com/workflows/accessing-payload-data/). Hope that helps!

---

<div class="post-metadata">

**Author:** ![Bryan\_Fleckenstein](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/bryan_fleckenstein/32/603_2.png) [@Bryan\_Fleckenstein](https://forums.losant.com/u/Bryan_Fleckenstein)\
**Post date:** [May 31, 2018, 3:19pm UTC](https://forums.losant.com/t/solved-indicator-block-time-condition/953/3 "2018-05-31T15:19:40Z")

</div>

Well, that was easy! This makes complete sense now. Appreciate the speedy response.
