# Is there a format mask for scientific notation to show "E+0"

**URL:** <https://forum.inductiveautomation.com/t/is-there-a-format-mask-for-scientific-notation-to-show-e-0/7265>\
**Category:** Ignition\
**Created:** [September 16, 2013, 9:41pm UTC](https://forum.inductiveautomation.com/t/is-there-a-format-mask-for-scientific-notation-to-show-e-0/7265 "2013-09-16T21:41:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bob/32/16899_2.png) [@Bob](https://forum.inductiveautomation.com/u/Bob)\
**Post date:** [September 16, 2013, 9:41pm UTC](https://forum.inductiveautomation.com/t/is-there-a-format-mask-for-scientific-notation-to-show-e-0/7265/1 "2013-09-16T21:41:58Z")

</div>

When displaying data in scientific notation a minus sign (-) is displayed as needed, for example 1.234E-1. However, values with a positive exponent do not show the plus sign (+), instead they show 1.234E1. For consistency we would like to display 1.234E+1 in this case. Is there a mask that can be used to force this?

Thanks,  
Bob

---

<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:** [September 16, 2013, 9:59pm UTC](https://forum.inductiveautomation.com/t/is-there-a-format-mask-for-scientific-notation-to-show-e-0/7265/2 "2013-09-16T21:59:13Z")

</div>

Are you trying to do this in scripting or with the format string for a component?

---

<div class="post-metadata">

**Author:** ![Bob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bob/32/16899_2.png) [@Bob](https://forum.inductiveautomation.com/u/Bob)\
**Post date:** [September 16, 2013, 10:10pm UTC](https://forum.inductiveautomation.com/t/is-there-a-format-mask-for-scientific-notation-to-show-e-0/7265/3 "2013-09-16T22:10:52Z")

</div>

Currently I am using the format string of the components, but if there is no format string option to make it work, I could use scripting.

---

<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:** [September 16, 2013, 10:17pm UTC](https://forum.inductiveautomation.com/t/is-there-a-format-mask-for-scientific-notation-to-show-e-0/7265/4 "2013-09-16T22:17:29Z")

</div>

Try using ‘%e’ in the format string.

---

<div class="post-metadata">

**Author:** ![Bob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bob/32/16899_2.png) [@Bob](https://forum.inductiveautomation.com/u/Bob)\
**Post date:** [September 17, 2013, 1:11pm UTC](https://forum.inductiveautomation.com/t/is-there-a-format-mask-for-scientific-notation-to-show-e-0/7265/5 "2013-09-17T13:11:46Z")

</div>

I tried different combinations with ‘%e’ and they didn’t work.

I tried many variations of the following: %e, 0.00%e0, 0.00%E0, 0.00e%0, …

It isn’t imperative that the “+” be shown, though typically it is displayed when using scientific notation, so some way to show it would be good.

---

<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:** [September 17, 2013, 6:12pm UTC](https://forum.inductiveautomation.com/t/is-there-a-format-mask-for-scientific-notation-to-show-e-0/7265/6 "2013-09-17T18:12:21Z")

</div>

Well, this is a bit of a hack, but you can use a NON-numeric label or text field, then make the value bound to an expression like the following:

```auto
stringFormat('%e', {Ramp1})
```

Java’s ‘%e’ string format specifier does include both the ‘+’ and ‘-’ characters in it. It appears that the number formatter leaves it out for positive values.

---

<div class="post-metadata">

**Author:** ![Bob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bob/32/16899_2.png) [@Bob](https://forum.inductiveautomation.com/u/Bob)\
**Post date:** [September 17, 2013, 7:19pm UTC](https://forum.inductiveautomation.com/t/is-there-a-format-mask-for-scientific-notation-to-show-e-0/7265/7 "2013-09-17T19:19:14Z")

</div>

Ok, thanks. I may give that a try.
