# SDK - Apply FormatString to a value

**URL:** <https://forum.inductiveautomation.com/t/sdk-apply-formatstring-to-a-value/15976>\
**Category:** Module Development\
**Created:** [November 13, 2017, 12:02pm UTC](https://forum.inductiveautomation.com/t/sdk-apply-formatstring-to-a-value/15976 "2017-11-13T12:02:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [November 13, 2017, 4:41pm UTC](https://forum.inductiveautomation.com/t/sdk-apply-formatstring-to-a-value/15976/2 "2017-11-13T16:41:07Z")

</div>

Pretty sure we’re just using the [DecimalFormat](https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html) class behind the scenes, so it would be something like this:

```auto
formatter = DecimalFormat(tag.getAttribute(TagProp.FormatString))
formatter.format(tag.getValue().getValue())

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/sdk-apply-formatstring-to-a-value/15976)._
