# Text-field text to date-time tag property binding

**URL:** <https://forum.inductiveautomation.com/t/text-field-text-to-date-time-tag-property-binding/10465>\
**Category:** Ignition\
**Created:** [September 15, 2015, 9:42am UTC](https://forum.inductiveautomation.com/t/text-field-text-to-date-time-tag-property-binding/10465 "2015-09-15T09:42:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@ian](https://forum.inductiveautomation.com/u/ian)\
**Post date:** [September 15, 2015, 9:42am UTC](https://forum.inductiveautomation.com/t/text-field-text-to-date-time-tag-property-binding/10465/1 "2015-09-15T09:42:55Z")

</div>

Hi all,

Is there a way to specify the date-time string format of the text-field text when it is property bound to a date-time (memory) tag?

I have a memory tag whose data type is datetime. In the memory tag itself, I specify the FormatString to be

> [@](#):
>
> yyyy-MM-dd h:mm:ss.S

such that it shows a value like

> [@](#):
>
> 2015-09-15 5:34:22.212

Then, I created a text field whose text is property bound to the tag.

It shows text like this:

> [@](#):
>
> Sep 15, 2015 5:34:22 PM

The millisecond precision is not shown in the text field. Somemore, the date-time display format is different.

Is there a way to specify the text-field text date-time display format when property bound to a date-time tag? If not, do we have to implement scripting to show the date-time text in the text-field text in format we want?

Thanks!

---

<div class="post-metadata">

**Author:** ![Chris\_Taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chris_taylor/32/3315_2.png) [@Chris\_Taylor](https://forum.inductiveautomation.com/u/Chris_Taylor)\
**Post date:** [September 15, 2015, 10:02am UTC](https://forum.inductiveautomation.com/t/text-field-text-to-date-time-tag-property-binding/10465/2 "2015-09-15T10:02:16Z")

</div>

ian

when binding on to the text field use the “Date and Time–dateFormat” expression

like this

```auto
dateFormat({[System]Gateway/CurrentDateTime},"yyyy-MM-dd h:mm:ss.S")
```

---

<div class="post-metadata">

**Author:** ![ian](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@ian](https://forum.inductiveautomation.com/u/ian)\
**Post date:** [September 15, 2015, 10:11am UTC](https://forum.inductiveautomation.com/t/text-field-text-to-date-time-tag-property-binding/10465/3 "2015-09-15T10:11:37Z")

</div>

Hi Chris,

That works! Thanks! 😃
