# isNull in expression binding with no effect

**URL:** <https://forum.inductiveautomation.com/t/isnull-in-expression-binding-with-no-effect/14053>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [April 14, 2017, 2:23pm UTC](https://forum.inductiveautomation.com/t/isnull-in-expression-binding-with-no-effect/14053 "2017-04-14T14:23:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 14, 2017, 2:23pm UTC](https://forum.inductiveautomation.com/t/isnull-in-expression-binding-with-no-effect/14053/1 "2017-04-14T14:23:58Z")

</div>

Ignition 7.9.2-RC1  
I have the following code in an texte expression binding :

`if(isNull({SYS_SERVER_GTC.ContainerServer.LabelDate.dateProp}),
"",
try(dateFormat(toDate({SYS_SERVER_GTC.ContainerServer.LabelDate.dateProp}), "yyyy/MM/dd HH:mm:ss"),"?"))`

When I open the windows in the vision client, the following error occurs:  
15:31:16.286 [AWT-EventQueue-2] WARN Expressions.DateFormatFunction - ‘dateFormat’ function expected a ‘date’ first argument, but got null

The value displayed is good but it seems that isNull don’t do is job 😟

---

<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:** [April 14, 2017, 3:58pm UTC](https://forum.inductiveautomation.com/t/isnull-in-expression-binding-with-no-effect/14053/2 "2017-04-14T15:58:37Z")

</div>

I was able to replicate your error by giving the tag a non-null value that’s not a date. This made isNull return false, but toDate return null. Perhaps that’s your problem?

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 14, 2017, 4:58pm UTC](https://forum.inductiveautomation.com/t/isnull-in-expression-binding-with-no-effect/14053/3 "2017-04-14T16:58:33Z")

</div>

{SYS\_SERVER\_GTC.ContainerServer.LabelDate.dateProp} is a custom String propertie binded to a String tag which is not Null. The tag is a memory with a string formatted “yyyy/MM/dd HH:mm:ss”. I have the error in the client when I open the windows, I suppose it is a transitory issue because the value displayed is OK ???

I will try this to avoid the transitory log error :

```auto
if(isNull(toDate({SYS_SERVER_GTC.ContainerServer.LabelDate.dateProp})),
"",
try(dateFormat(toDate({SYS_SERVER_GTC.ContainerServer.LabelDate.dateProp}), "yyyy/MM/dd HH:mm:ss"),"?"))
```
