# Extracting the Date and TimeValue

**URL:** <https://community.homey.app/t/extracting-the-date-and-timevalue/132865>\
**Category:** Questions & Help\
**Created:** [March 16, 2025, 2:53pm UTC](https://community.homey.app/t/extracting-the-date-and-timevalue/132865 "2025-03-16T14:53:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Litego](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/litego/32/121579_2.png) [@Litego](https://community.homey.app/u/Litego)\
**Post date:** [March 16, 2025, 2:53pm UTC](https://community.homey.app/t/extracting-the-date-and-timevalue/132865/1 "2025-03-16T14:53:23Z")

</div>

Hello, how do I get the Date and TimeValue of a date or time? I need it as a number so that I can use it in calculations. Right now I am trying to convert the Sunrise and Sunset to numbers so that I can calculate how many seconds these is between the two and use this value in transitions in Chronograph in order to dim lights.

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [March 16, 2025, 11:59pm UTC](https://community.homey.app/t/extracting-the-date-and-timevalue/132865/3 "2025-03-16T23:59:53Z")

</div>

Search this forum for Time calculation, it is asked before.  
Also have a look here below under Related topics.

---

<div class="post-metadata">

**Author:** ![To\_Lou](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/to_lou/32/79159_2.png) [@To\_Lou](https://community.homey.app/u/To_Lou)\
**Post date:** [August 18, 2025, 11:19am UTC](https://community.homey.app/t/extracting-the-date-and-timevalue/132865/4 "2025-08-18T11:19:09Z")

</div>

![Screenshot_20250818_175302_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/5/c57a9ff9b602afc798ba58a815b6348a69496c74.jpeg)
