# Snap shot date time

**URL:** <https://forum.inductiveautomation.com/t/snap-shot-date-time/40065>\
**Category:** Ignition\
**Created:** [October 27, 2020, 7:34pm UTC](https://forum.inductiveautomation.com/t/snap-shot-date-time/40065 "2020-10-27T19:34:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bnolan40](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@Bnolan40](https://forum.inductiveautomation.com/u/Bnolan40)\
**Post date:** [October 27, 2020, 7:34pm UTC](https://forum.inductiveautomation.com/t/snap-shot-date-time/40065/1 "2020-10-27T19:34:34Z")

</div>

Hello I am coming from a wonderware background so bare with me. I am trying to snap shot the current time into a string from a push button can’t seem to get just the time.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 27, 2020, 7:37pm UTC](https://forum.inductiveautomation.com/t/snap-shot-date-time/40065/2 "2020-10-27T19:37:28Z")

</div>

You can use the dateFormat function and format the DateTime object to just the time portion  
[https://docs.inductiveautomation.com/display/DOC80/dateFormat](https://docs.inductiveautomation.com/display/DOC80/dateFormat)

Also, welcome aboard the Ignition train

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 27, 2020, 8:49pm UTC](https://forum.inductiveautomation.com/t/snap-shot-date-time/40065/3 "2020-10-27T20:49:00Z")

</div>

```auto
system.date.format(system.date.now(), "HH:mm:ss")

```

You’ll want to examine string formatting in Python, but this will do what you’re looking for. Keep in mind this will be the time of the Gateway - not the client.

Edit: thanks, @paul-griffith. Also: [docs](https://docs.inductiveautomation.com/display/DOC80/system.date.format)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 27, 2020, 11:09pm UTC](https://forum.inductiveautomation.com/t/snap-shot-date-time/40065/4 "2020-10-27T23:09:25Z")

</div>

Ah yes, button = python, whoops! 😳

---

<div class="post-metadata">

**Author:** ![Bnolan40](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@Bnolan40](https://forum.inductiveautomation.com/u/Bnolan40)\
**Post date:** [October 28, 2020, 2:09am UTC](https://forum.inductiveautomation.com/t/snap-shot-date-time/40065/5 "2020-10-28T02:09:46Z")

</div>

Thanks guys! I just needed to be pointed in the right direction.
