iam reading scale values from a scale in vb.net. now iam getting values like 33333kg and 55555kg and I want to format it such that I get values like 33.333kg and 55.555kg
Jump to Post
Are you receiving that back as a formatted string?
If so, can you do something like this?:
Imports System.Text.RegularExpressions Module Module1 Function ConvertValueString(ByVal strValueString As String) As String Dim dbl As Double = 0 Double.TryParse(Regex.Replace(strValueString, "[^0-9]", ""), dbl) ' digits only Return (dbl / 1000).ToString() & …
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.