# system.tag.writeToTag(\<date\>) fails to update tag

**URL:** <https://forum.inductiveautomation.com/t/system-tag-writetotag-date-fails-to-update-tag/17295>\
**Category:** Ignition\
**Tags:** ignition78\
**Created:** [March 9, 2018, 3:01pm UTC](https://forum.inductiveautomation.com/t/system-tag-writetotag-date-fails-to-update-tag/17295 "2018-03-09T15:01:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [March 9, 2018, 3:01pm UTC](https://forum.inductiveautomation.com/t/system-tag-writetotag-date-fails-to-update-tag/17295/1 "2018-03-09T15:01:03Z")

</div>

I have created a read/write DateTime memory tag ‘[default]ping/LastPingStartTime’. It’s reading 1970-01-01 in the tag browser.  
I’m trying to update it with the following test script.

```auto
import datetime

now = datetime.datetime.now()
print now
system.tag.writeToTag('[default]ping/LastPingStartTime', now)
print system.tag.read("[default]BAPL_ping/LastPingStartTime")

```

- The print command reports the correct timestamp.
- The tag.read reports the tag value correctly.
- The tag doesn’t update.

Can anyone find my error?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [March 9, 2018, 3:16pm UTC](https://forum.inductiveautomation.com/t/system-tag-writetotag-date-fails-to-update-tag/17295/2 "2018-03-09T15:16:03Z")

</div>

That worked fine for me, did you set the Data Format on the tag?  
Under the Metadata tab, set it to yyyy-MM-dd h:mm:ss aa

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [March 9, 2018, 3:21pm UTC](https://forum.inductiveautomation.com/t/system-tag-writetotag-date-fails-to-update-tag/17295/3 "2018-03-09T15:21:03Z")

</div>

Yes, thank you. Data format is correct.  
I wonder if I have a permissions problem?

Update:  
The script console is giving me the following error. “Gateway Comm Mode is not Read/Write.”  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/18167f3e8b5cc0e323e2de32e2116c7c5ee47c3a.png)

Now where do I configure that?

Update 2:  
Solved: Project | Comm Read/Write.  
Turn that on and it all works.

Thanks.
