• Stripping Leading Zeros

    From Mark Deal@21:1/5 to All on Tue Sep 15 12:33:40 2020
    Can anybody suggest a single command to strip leading zeros from a string such that 0001234 becomes 1234 and 0000321 becomes 321?

    I has to be a single command because it is being set in a field within a 3rd party application called Time Matters. I'm looking for something like this:

    '&AGE(DEFORMAT(CON:CON1_03_03,@D2)) &'

    I cannot find a way to strip a character from a string.

    Thank you!

    Mark A. Deal

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Colin Reynolds@21:1/5 to Mark Deal on Wed Sep 16 00:43:22 2020
    On Tuesday, September 15, 2020 at 8:33:42 PM UTC+1, Mark Deal wrote:
    Can anybody suggest a single command to strip leading zeros from a string such that 0001234 becomes 1234 and 0000321 becomes 321?

    I thought that Clarion will automatically convert strings to numbers / numbers to strings.

    The AGE function returns a STRING value, would wrapping it in the INT() function do it for you?

    Something like INT(AGE(CON:CON1_03_03,@D2))

    Just wondering

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Deal@21:1/5 to Colin Reynolds on Wed Sep 16 06:01:20 2020
    On Wednesday, September 16, 2020 at 3:43:24 AM UTC-4, Colin Reynolds wrote:
    On Tuesday, September 15, 2020 at 8:33:42 PM UTC+1, Mark Deal wrote:
    Can anybody suggest a single command to strip leading zeros from a string such that 0001234 becomes 1234 and 0000321 becomes 321?

    I thought that Clarion will automatically convert strings to numbers / numbers to strings.

    The AGE function returns a STRING value, would wrapping it in the INT() function do it for you?

    Something like INT(AGE(CON:CON1_03_03,@D2))

    Just wondering

    Wow, so simple and I cannot believe that I didn't come up with that. Perfect, and works exactly like I needed. Thank you!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)