Skip to main content

Search

Search

Databasevalue To Number With 2 Decimals

Comments

2 comments

  • Avatar
    Shotaro Ito

    Is that German number? On the text's Transform > VB Script > OnProcessData, apply below

     

    'Set locale to German-Germany'
    Call SetLocale(1031)
    If IsNumeric(Value) Then
      Value = FormatNumber(Value,2)
    End If
    

    On BT10.0 or later, there's number format with specific locale to take such format too.

    0
  • Avatar
    Legacy Poster

    Thanks, i've got it working with below code:

     

    Call SetLocale(1043)
    If IsNumeric(Value) Then
        Value=Replace(Value,".","")
      Value = FormatNumber(Value,2)
    End If
    0

Please sign in to leave a comment.