# IA how to guides, how to get current time in python

**URL:** <https://forum.inductiveautomation.com/t/ia-how-to-guides-how-to-get-current-time-in-python/66366>\
**Category:** Ignition\
**Created:** [November 10, 2022, 8:02pm UTC](https://forum.inductiveautomation.com/t/ia-how-to-guides-how-to-get-current-time-in-python/66366 "2022-11-10T20:02:21Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [November 10, 2022, 8:02pm UTC](https://forum.inductiveautomation.com/t/ia-how-to-guides-how-to-get-current-time-in-python/66366/1 "2022-11-10T20:02:21Z")

</div>

I just came across the one. This should refer to the standard system library functions, right? It could also be formatted as code. Seems like a bit of a strange how to guide to have though!

 ![Screenshot_20221111-062817_Brave](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/8/38f5ab5201e66974e10975136204ee8162291fa3.jpeg)

> **[How to get the current timestamp in a python script](https://support.inductiveautomation.com/hc/en-us/articles/360047171652-How-to-get-the-current-timestamp-in-a-python-script)**
>
> Use the following code to get the current time. More info at http://docs.python.org/library/time.html from time import strftime timestr = strftime("%Y-%m-%d %H:%M:%S")

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 10, 2022, 11:45pm UTC](https://forum.inductiveautomation.com/t/ia-how-to-guides-how-to-get-current-time-in-python/66366/2 "2022-11-10T23:45:20Z")

</div>

I wonder if that was some auto import of a really old KB article or something. Seems pretty out of place.

---

<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:** [November 11, 2022, 12:45am UTC](https://forum.inductiveautomation.com/t/ia-how-to-guides-how-to-get-current-time-in-python/66366/3 "2022-11-11T00:45:26Z")

</div>

Haha, that's what I was thinking. I saw the "updated 5 months ago" and thought that was a bit strange
