# Writing to client date tag error in client startup script

**URL:** <https://forum.inductiveautomation.com/t/writing-to-client-date-tag-error-in-client-startup-script/16030>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [November 16, 2017, 9:34pm UTC](https://forum.inductiveautomation.com/t/writing-to-client-date-tag-error-in-client-startup-script/16030 "2017-11-16T21:34:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShazamThat](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@ShazamThat](https://forum.inductiveautomation.com/u/ShazamThat)\
**Post date:** [November 16, 2017, 9:34pm UTC](https://forum.inductiveautomation.com/t/writing-to-client-date-tag-error-in-client-startup-script/16030/1 "2017-11-16T21:34:34Z")

</div>

I'm experiencing an odd error and I'm not sure how to resolve this.

I have a client startup script that has the following code:

> system.tag.write("[Client]Special/startDate",system.date.format(system.date.now(),'MM/dd/yyyy 6:00:00'))  
> system.tag.write("[Client]Special/endDate",system.date.format(system.date.now(),'MM/dd/yyyy HH:mm:00'))

And for some reason it doesn't execute?

But the following code does in the same client startup script:

> system.tag.write(clientTag, system.tag.read(tag).value)

Which indicates the client startup script is excecuting.

Furthermore, when I put the two lines of code above in a client timer script, it executes just fine.

Any suggestions?

---

<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:** [November 16, 2017, 10:05pm UTC](https://forum.inductiveautomation.com/t/writing-to-client-date-tag-error-in-client-startup-script/16030/2 "2017-11-16T22:05:04Z")

</div>

I just tried out your code with no issues. One thing to keep in mind (and I didn’t realize it myself, until I played with this) is that when you publish the project, the startup script does not run on updated clients (ones already running). they need to start fresh.

---

<div class="post-metadata">

**Author:** ![ShazamThat](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@ShazamThat](https://forum.inductiveautomation.com/u/ShazamThat)\
**Post date:** [November 16, 2017, 10:40pm UTC](https://forum.inductiveautomation.com/t/writing-to-client-date-tag-error-in-client-startup-script/16030/3 "2017-11-16T22:40:08Z")

</div>

Oddly, I’m still having no luck.

If it helps, the tag that its writing to is a Date Range component where the startDate and endDate is binded to these tags bidirectionally.
