Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8695855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:08:25+00:00 2026-06-13T01:08:25+00:00

Using powerbuilder script, what is the easiest way to convert the string 0.5 to

  • 0

Using powerbuilder script, what is the easiest way to convert the string “0.5” to “50%”?

I’ve tried converting to Double first, but Double(“0.5”) returns 0..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:08:27+00:00Added an answer on June 13, 2026 at 1:08 am

    Do you have any specific decimal separator other than . or ,?

    In PB, the conversion from a string value to another type uses the regional settings. The same problem arises for converting other types like date or time.

    Beware of the double (or float) type: floating point except for scientific computing is a painful path. Prefer the decimal type.

    Here (with a coma as decimal separator) the following code seems to do what you are looking for:

    dec value
    
    value = dec("0,5")
    value *= 100
    value = int(value) //intermediate cast to integer to remove the decimal part
    
    messagebox("percent", string(value)+"%")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using batch script, I want to get a first token of a line delimited
Setup : Using PowerBuilder 6.5. I have a composite report (with a report header)
We are using citrix server for some applications which is developed from PowerBuilder. The
Using SQL Server 2008 R2 we are looking for a way to select the
Using CI for the first time and i'm smashing my head with this seemingly
Using import datetime in python, is it possible to take a formatted time/date string
We are using MS Office 2010 with PowerBuilder 10.5. While using mail merge functionality
I am using a tree datawindow in powerbuilder. This repesents a mixture of tree
How to connect the database using Middleware NxTera in PowerBuilder?
Using the Qt library, is there a way to automatically update a QDateTimeEdit using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.