I know I'm dense some days, but I can't seem to figure this one out. I am processing money data which comes in OCONVed. When I ICONV it I run into trouble with negative amounts when dollar signs and commas are involved. This is what I've tested (MR returns the same result as MD):

AMT             ICONV(AMT, 'MD2')'
*************** *********************
      $1,200.00 120000
     $-1,200.00 nothing returned
     -$1,200.00 nothing returned
    ($1,200.00) nothing returned
       -1200.00 -120000
       -1200.00 -120000
       -1200.00 -120000
      (1200.00) nothing returned

AMT             ICONV(AMT, 'MD2,$-')
*************** *********************
      $1,200.00 120000
     $-1,200.00 nothing returned
     -$1,200.00 nothing returned
    ($1,200.00) nothing returned
        1200.00 120000
       -1200.00 -120000
       -1200.00 -120000
      (1200.00) nothing returned

AMT             ICONV(AMT, 'MD2$-')
*************** *********************
       $1200.00 120000
      $-1200.00 nothing returned
      -$1200.00 nothing returned
     ($1200.00) nothing returned
        1200.00 120000
       -1200.00 -120000
       -1200.00 -120000
      (1200.00) nothing returned

AMT             ICONV(AMT, 'MD2,-')
*************** *********************
       1,200.00 120000
      -1,200.00 -120000
      -1,200.00 -120000
     (1,200.00) nothing returned
        1200.00 120000
       -1200.00 -120000
       -1200.00 -120000
      (1200.00)
nothing returned

Is there something I'm missing here? I'd like ICONV to do all the work (I know, I'm lazy) without having to strip the $ and , out first. I'm running version 3.4.7 on XP.

Thanks,
Charlie Noah

--

Tiny Bear's Wild Bird Store
"Everything For The Backyard Bird Enthusiast, Except For The Birds"
http://www.TinyBearWildBirdStore.com
Toll Free: 1-855-TinyBear (855-846-9232)

--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
 
To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
 
 
 

Reply via email to