Nice one, Jim. I like your way better.

Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

From: 'James Bentley' via RBASE-L <[email protected]>
Sent: February 7, 2020 10:39 AM
To: [email protected]
Subject: Re: [RBASE-L] - RE: display format in a variable

Dan
Try the following
set var vCurAmt currency = 1,975.32
set var vFmtAmt text = ((FORMAT(.vCurAmt*100,'[-]000000000')))
Sho Var v%

result:
vCurAmt            = $1,975.32                                CURRENCY
vFmtAmt            = 000197532                                TEXT


Jim Bentley, American Celiac Society 1-504-305-2968


On Thursday, February 6, 2020, 3:03:25 PM CST, Stephen Markson 
<[email protected]<mailto:[email protected]>> wrote:


R> SET VAR vTextAmount TEXT='$1,975.32'
R> SET VAR vResult 
TEXT=(SFIL('0',9-SLEN(CTXT(INT(100*FLOAT(.vTextAmount)))))+CTXT(INT(100*FLOAT(.vTextAmount))))
R> SHOW VAR vResult
000197532

Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

-----Original Message-----
From: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>> On Behalf Of Dan 
Goldberg
Sent: February 6, 2020 3:01 PM
To: [email protected]<mailto:[email protected]>
Subject: [RBASE-L] - display format in a variable

I need to right justified a currency in a text variable and need help on th= e 
format function.

If I have an amount:

$975.32

I need to display it in the variable as:

000097532

I see in the help I can right justify and use 0 as blanks but not sure on h= ow 
to write it.

TIA

Dan Goldberg

--
For group guidelines, visit 
https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.rbase.com%2fsupport%2fusersgroup_guidelines.php&c=E,1,kmS--UE8xiyjbAokada_mxEUA7U1kXjMEBOthlLtndw3G9GPcnfpFHtwSkAzyf_HNYhYsVl4CkrHcR894W3NvPmbAM3EigAN5sDZcXa78z_R&typo=1
---
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].<mailto:[email protected].>
To view this discussion on the web visit 
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2frbase-l%2f2E4830CEC16615458329D3D83342F8D0014303856B%40exchange11.&c=E,1,_2gMOKyRwu0LtcX_QTcOmrY6DxV7o7i46Sue6cCyAKMB70o2ZHm0WyZbDm9uv0vyZAs3eobQiOHsF_Cp497iETiqwzYQRrGQMfp1S8dAdvIeOk_G2jc,&typo=1


--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.rbase.com%2fsupport%2fusersgroup_guidelines.php&c=E,1,XYSLpgPpze5S0Ui39YnTfYO8rajADZ-CIhBMNT6Cafhap_y8Rbkg40Qlgtv_Ags4OzQdjQ-n6lDIPYmHP0RGwIGo7gSCMQEzv1DfslGJkg,,&typo=1>
---
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].<mailto:[email protected].>

To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/yqbpr0101mb1777f0c95631b6c1cb6f52f7d6...@yqbpr0101mb1777.canprd01.prod.outlook.com<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2frbase-l%2fYQBPR0101MB1777F0C95631B6C1CB6F52F7D61D0%40YQBPR0101MB1777.CANPRD01.PROD.OUTLOOK.COM.&c=E,1,3aoSUU1_rpQsnMLOGp28Wi07M39r8KO5nZgsElS-hTJDCipcFUoAJXuiXsiK42TECnPNvuHkzfMeoaGiLRpQ5hAkhHVD0YYtGvbPLY9iT-Gx46xhufhwuYD9&typo=1>.
--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.rbase.com%2fsupport%2fusersgroup_guidelines.php&c=E,1,Tfr1FIMsA1530XfWlGCTj728TRh15Gl7nWifpa786T38YQMOLoIC2a9ryCjxxAgHU8pPtmVh5nX5Hlt55loRkbZJxlBsJR-kNWaXURcwlcpMXxtZSIEPHfG-CpW2&typo=1>
---
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/1905448292.892390.1581089917967%40mail.yahoo.com<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2frbase-l%2f1905448292.892390.1581089917967%2540mail.yahoo.com%3futm_medium%3demail%26utm_source%3dfooter&c=E,1,3Uoa9E3k5TG4f4FqfWaqXm1_9Hg_J2aZNJU1Y9xc3vh0JZ_ynRYXEAgkE18lE7juufeMKgFy7ZOIGmzVe5IyGKIF-Ri5FaDaz3a1AkAUZEGIxXXE&typo=1>.

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/YQBPR0101MB17774032EED926EBAF7C2AE6D61C0%40YQBPR0101MB1777.CANPRD01.PROD.OUTLOOK.COM.

Reply via email to