# Expression date

**URL:** <https://forum.inductiveautomation.com/t/expression-date/7012>\
**Category:** Ignition\
**Created:** [August 9, 2013, 7:44pm UTC](https://forum.inductiveautomation.com/t/expression-date/7012 "2013-08-09T19:44:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [August 9, 2013, 7:44pm UTC](https://forum.inductiveautomation.com/t/expression-date/7012/1 "2013-08-09T19:44:38Z")

</div>

I have a DateTime tag inside my UDT which I would like to be a date depending on another tag within my UDT and I had thought to use this:

```auto
forceQuality(if(hasChanged({[.]stateWatch}), coalesce(now(),0), coalesce({[.]SetDate},0)
```

or use another tag called currentDate which is now()

Im having problems getting this code to be accepted.
