# Reset button show date and time

**URL:** <https://forum.inductiveautomation.com/t/reset-button-show-date-and-time/14049>\
**Category:** Ignition\
**Created:** [April 13, 2017, 11:10pm UTC](https://forum.inductiveautomation.com/t/reset-button-show-date-and-time/14049 "2017-04-13T23:10:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lozzer65](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lozzer65](https://forum.inductiveautomation.com/u/lozzer65)\
**Post date:** [April 13, 2017, 11:10pm UTC](https://forum.inductiveautomation.com/t/reset-button-show-date-and-time/14049/1 "2017-04-13T23:10:28Z")

</div>

Hi  
I want to display the date and time that a button was last pressed. What is the best way to do this please  
Thanks

---

<div class="post-metadata">

**Author:** ![Caleb\_Bohon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/caleb_bohon/32/3293_2.png) [@Caleb\_Bohon](https://forum.inductiveautomation.com/u/Caleb_Bohon)\
**Post date:** [April 14, 2017, 12:40pm UTC](https://forum.inductiveautomation.com/t/reset-button-show-date-and-time/14049/2 "2017-04-14T12:40:58Z")

</div>

Use a script on the button to load the current date into a tag. Then display the value of that tag.

Code would look something like this:

```
now = system.date.now()
system.tag.write("path/datetag", now)

```

Or you can do it in one line like this:

`system.tag.write("path/datetag", system.date.now())`

See the user manual for more information:  
Scripting Functions here: [https://docs.inductiveautomation.com/display/DOC79/Scripting+Functions](https://docs.inductiveautomation.com/display/DOC79/Scripting+Functions)

---

<div class="post-metadata">

**Author:** ![lozzer65](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lozzer65](https://forum.inductiveautomation.com/u/lozzer65)\
**Post date:** [April 14, 2017, 2:25pm UTC](https://forum.inductiveautomation.com/t/reset-button-show-date-and-time/14049/3 "2017-04-14T14:25:17Z")

</div>

Thank you for your help. I will try this.
