# Data segregation and display in different ui text

**URL:** <https://discourse.nodered.org/t/data-segregation-and-display-in-different-ui-text/20847>\
**Category:** General\
**Created:** [25 January 2020 19:11 UTC](https://discourse.nodered.org/t/data-segregation-and-display-in-different-ui-text/20847 "2020-01-25T19:11:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)\
**Post date:** [25 January 2020 19:36 UTC](https://discourse.nodered.org/t/data-segregation-and-display-in-different-ui-text/20847/2 "2020-01-25T19:36:44Z")

</div>

I would use a function node splitting your incoming string into two parts using `sting.split(“|”)` Take a look here somebody had a similar problem:

> [@Separate time stamp and payload from string](https://discourse.nodered.org/t/separate-time-stamp-and-payload-from-string/20425/2):
>
> Welcome! Your device is sending not so “well” formatted messages but never mind. You can use a function node using the string.split() function and take your string appart: var parts=msg.payload.split(“:”); msg.timeString=parts[0]+”:”+parts[1]+”:”+parts [2]; msg.payload=Number(parts[3]); msg.timestamp= new Date(); msg.timestamp=msg.timestamp.setHours(Number(parts[0]), Number(parts[1]), Number(parts[2])).valueOf(); return msg; Code not tested just typed in on my phone but give it a try.

---

_[View the full topic](https://discourse.nodered.org/t/data-segregation-and-display-in-different-ui-text/20847)._
