ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Converting a character to num

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Converting a character to num

    If I have a character parm. How do I switch it to a numeric? For example I have a POSTDATE PARM which is a character field and I want to convert it to a numeric for calculations what is the best method to do this?

    Thanks,

    DAC

  • #2
    Re: Converting a character to num

    Check out the following:

    Using the %Dec Function

    Comment


    • #3
      Re: Converting a character to num

      dcutaia,

      There are a number of ways to do this. You could use the %INT() BIF. You could use a data structure. Since it is a date I would use the %DATE BIF. That way all the date math is much easier.

      HTH,
      MdnghtPgmr
      "Tis better to be thought a fool then to open one's mouth and remove all doubt." - Benjamin Franklin

      Comment

      Working...
      X