# Elapsed Time

**URL:** <https://forum.inductiveautomation.com/t/elapsed-time/2320>\
**Category:** Ignition\
**Created:** [November 4, 2010, 7:20pm UTC](https://forum.inductiveautomation.com/t/elapsed-time/2320 "2010-11-04T19:20:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jay](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jay](https://forum.inductiveautomation.com/u/jay)\
**Post date:** [November 4, 2010, 7:20pm UTC](https://forum.inductiveautomation.com/t/elapsed-time/2320/1 "2010-11-04T19:20:47Z")

</div>

I want to calculate the time that has elapsed (in seconds) since the last update of a SQLTag using a Python script. That is, I want the difference between time.time() and myTag.LastChange, but I’m stumped on how to convert myTag.LastChange to epoch time.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [November 4, 2010, 9:48pm UTC](https://forum.inductiveautomation.com/t/elapsed-time/2320/2 "2010-11-04T21:48:54Z")

</div>

lastChange is a Java Date. use the .getTime() function to return it as a UTC epoch-based timestamp. In Java, the epoch is Jan 1, 1970 and the resolution is milliseconds.
