Formatting values that contain zeroes to the left.

Question:

How can I format a value containing zeroes to its left and then later save it in a historic?

Solution:

To add zeroes to the left, use the following logic in the historic’s data source:

  1. “000”&Value ‘ (adds zeroes to the left)
  2. Right (“000″&Value,3) ‘ (takes the three values to the right)

The Historic’s data source is this: Right(“000″&Data.Variable.Value,3)

See the attached demo application.

Attachments:

Sample.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *