# Expression taking 17 seconds approx to convert float to string in UDT

**URL:** <https://forum.inductiveautomation.com/t/expression-taking-17-seconds-approx-to-convert-float-to-string-in-udt/45542>\
**Category:** Ignition\
**Created:** [April 13, 2021, 5:01pm UTC](https://forum.inductiveautomation.com/t/expression-taking-17-seconds-approx-to-convert-float-to-string-in-udt/45542 "2021-04-13T17:01:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![archana.kachru](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@archana.kachru](https://forum.inductiveautomation.com/u/archana.kachru)\
**Post date:** [April 13, 2021, 5:01pm UTC](https://forum.inductiveautomation.com/t/expression-taking-17-seconds-approx-to-convert-float-to-string-in-udt/45542/1 "2021-04-13T17:01:40Z")

</div>

Ignition version 7.9.4  
I have created a UDT where I receive the date and time in float from a Plc. I pass these values to an expression tag (datatype string type). we are using the following expression for this:

```auto
dateformat(fromMillis(tolong(({{[.]IG_CloseDate_R}-25569)*86400000 + tolong({[.]IG_CloseTime_R}*86400000)-(getTimezoneRawOffset()*60*60*1000))), "yyyy-MM-dd HH:mm:ss")

```

the open /close date and time are in float

This expression takes 17 seconds to resolve.  
Is there any way to reduce the time it is taking? 17 seconds is too long.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 13, 2021, 5:18pm UTC](https://forum.inductiveautomation.com/t/expression-taking-17-seconds-approx-to-convert-float-to-string-in-udt/45542/2 "2021-04-13T17:18:02Z")

</div>

Did you copy/paste this or incorrectly transcribe it? There are an unbalanced number of curly brackets.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 13, 2021, 5:18pm UTC](https://forum.inductiveautomation.com/t/expression-taking-17-seconds-approx-to-convert-float-to-string-in-udt/45542/3 "2021-04-13T17:18:50Z")

</div>

Also, it’s probably not that your expression itself is taking 17 seconds, but that the expression is on a scan class that’s slow for some other reason, like query tag(s). If you move the expression tag to a new scan class, does it still take 17 seconds?

---

<div class="post-metadata">

**Author:** ![archana.kachru](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@archana.kachru](https://forum.inductiveautomation.com/u/archana.kachru)\
**Post date:** [April 13, 2021, 6:26pm UTC](https://forum.inductiveautomation.com/t/expression-taking-17-seconds-approx-to-convert-float-to-string-in-udt/45542/4 "2021-04-13T18:26:19Z")

</div>

i wrote this code to the website by hand, so there is a chance that i missed a bracket.

---

<div class="post-metadata">

**Author:** ![archana.kachru](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@archana.kachru](https://forum.inductiveautomation.com/u/archana.kachru)\
**Post date:** [April 13, 2021, 6:27pm UTC](https://forum.inductiveautomation.com/t/expression-taking-17-seconds-approx-to-convert-float-to-string-in-udt/45542/5 "2021-04-13T18:27:45Z")

</div>

so, the expression tag is set to 1 sec, all the other memory tags providing the float values are also set to 1 sec.  
when i change a float value , i can count upto 15 before i see the updated string on the expression tag.

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [April 13, 2021, 7:28pm UTC](https://forum.inductiveautomation.com/t/expression-taking-17-seconds-approx-to-convert-float-to-string-in-udt/45542/6 "2021-04-13T19:28:32Z")

</div>

Go to your Gateway Webpage \>\> Status \>\> Tags \>\> Click “Details” next to your Realtime Tag Provider \>\> Scanclasses. You should see a list of your scan classes with various stats. Take a screenshot if you are allowed to and upload here. You’re looking for any scan classes where the “Last Duration” or “Avg Duration” is greater than the rate.
