Jump to content

decimal string to number


ascolda

Recommended Posts

Hello everybody, my question is a really simple one. 

 

Output data in my case is numbers from 0000 to 9999. It comes in the string format and I need to display it in the number format which would always have four digits.  "Decimal string to number" function deletes non-significant zeroes before number, it makes number 126 out of "0126" string.

Is there a possibility to display decimal number which always has four digits?

 

Thanks!

Link to comment

This is sounding strictly like a display format issue on the numeric indicator.  Right-click on the indicator and choose "Display Format".  You can also get to this via "Properties" and finding the Display Format tab.  I recommend going into the Advanced editing mode and put in "%04d".  This will require the display to have at least 4 digits, filling on the left 0s.

  • Like 1
Link to comment
This is sounding strictly like a display format issue on the numeric indicator.  Right-click on the indicator and choose "Display Format".  You can also get to this via "Properties" and finding the Display Format tab.  I recommend going into the Advanced editing mode and put in "%04d".  This will require the display to have at least 4 digits, filling on the left 0s.

 Thanks a lot, it worked! As I said it was a really simple problem. I should definitely get into formatting codes.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.