# System.date.now() not working

**URL:** <https://forum.inductiveautomation.com/t/system-date-now-not-working/12584>\
**Category:** Ignition\
**Created:** [January 20, 2017, 11:00am UTC](https://forum.inductiveautomation.com/t/system-date-now-not-working/12584 "2017-01-20T11:00:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![CuninganReset](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CuninganReset](https://forum.inductiveautomation.com/u/CuninganReset)\
**Post date:** [January 20, 2017, 11:00am UTC](https://forum.inductiveautomation.com/t/system-date-now-not-working/12584/1 "2017-01-20T11:00:12Z")

</div>

Hello.

I am trying to call system.date.now() from script console and the return is that system.data do not has .date at all.

---

<div class="post-metadata">

**Author:** ![markdobtech](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@markdobtech](https://forum.inductiveautomation.com/u/markdobtech)\
**Post date:** [January 20, 2017, 12:37pm UTC](https://forum.inductiveautomation.com/t/system-date-now-not-working/12584/2 "2017-01-20T12:37:53Z")

</div>

```auto
now = system.date.now()
print now
```

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [January 20, 2017, 1:17pm UTC](https://forum.inductiveautomation.com/t/system-date-now-not-working/12584/3 "2017-01-20T13:17:41Z")

</div>

[quote=“markdobtech”]`
now = system.date.now()
print now
`[/quote]  
I had thought the same, but in 7.8, it returns a date either way.

I’m going with the local jython copy getting corrupted.

Try deleting the {userName}.ignition folder and relaunch the designer. A fresh copy should then download to your PC.

---

<div class="post-metadata">

**Author:** ![CuninganReset](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CuninganReset](https://forum.inductiveautomation.com/u/CuninganReset)\
**Post date:** [January 23, 2017, 7:50am UTC](https://forum.inductiveautomation.com/t/system-date-now-not-working/12584/4 "2017-01-23T07:50:51Z")

</div>

I tryed to delete .ignition and reload the designer but still fail.

Also I try other system.data.\* functions and all returns the same error.

My Gateway version is 7.8.0

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 23, 2017, 1:41pm UTC](https://forum.inductiveautomation.com/t/system-date-now-not-working/12584/5 "2017-01-23T13:41:01Z")

</div>

I have no idea why your system.date.\* functions don’t work, but you can use [java’s Date type](http://docs.oracle.com/javase/8/docs/api/java/util/Date.html) directly as an alternative to system.date.now():`from java.util import Date
now = Date()`

---

<div class="post-metadata">

**Author:** ![CuninganReset](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@CuninganReset](https://forum.inductiveautomation.com/u/CuninganReset)\
**Post date:** [January 23, 2017, 2:53pm UTC](https://forum.inductiveautomation.com/t/system-date-now-not-working/12584/6 "2017-01-23T14:53:39Z")

</div>

Yes, this is what i did, but if the manual said that system.date.now() works i do not know why it not works…

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [January 23, 2017, 3:29pm UTC](https://forum.inductiveautomation.com/t/system-date-now-not-working/12584/7 "2017-01-23T15:29:15Z")

</div>

system.date.\* was added for 7.8.1, so you won’t have it available in 7.8.0.
