# \[APP\]\[Pro\] Better Logic Library - For Users

**URL:** <https://community.homey.app/t/app-pro-better-logic-library-for-users/71876>\
**Category:** Apps\
**Tags:** app, tools, homey-pro, logic, bll\
**Created:** [November 7, 2022, 10:13pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876 "2022-11-07T22:13:40Z")\
**Posts on this page:** 1\
**Showing post:** 64

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [June 30, 2023, 6:51pm UTC](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/64 "2023-06-30T18:51:00Z")

</div>

> [@Pat\_M](#):
>
> I’m struggling to calculate (in a easy way) this diff like `Set Minutes ($timenow$-Temp_Garage)` where garage is `Get properties of Temp_Garage`-\>Last changed (datetime).

Yes:  
First off, install the latest version of BLL, because the card you need had a bug in it:

> **[Better Logic Library](https://homey.app/en-us/app/net.i-dev.betterlogic/Better-Logic-Library/)**
>
> Just some better logic, variable and library management

Then you need this:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/3/03136baf19b9279a50880536c0abbf81e9871d58.png)

- Left you retrieve the properties of a variable, in this case the variable is called asd
- In the middle card, you calculate the time difference between `now` and the `last changed`. This will result in the time difference in milliseconds.
- The last card (which had a bug in it) you can use to convert that millisecond result into a format you want, minutes in this case, so just write a `M` and select that one from the dropdown list.

\_

- Ofc, if you need the minutes as a real number, not as a text, you could do it like this:  
`Math.round((now - [last-changed-tag] ) / 1000 / 60)`

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/d/4d9a7a48834aaa2b0ce0aed49ca257784bfcd0a4.png)

---

_[View the full topic](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876)._
