VBScript FormatCurrency လုပ်ဆောင်ချက်
❮ VBScript အကိုးအကားကို အပြီးသတ်ပါ။
FormatCurrency လုပ်ဆောင်ချက်သည် ကွန်ပျူတာ၏ ထိန်းချုပ်မှုဘောင်တွင် သတ်မှတ်ထားသော ငွေကြေးသင်္ကေတကို အသုံးပြု၍ ငွေကြေးတန်ဖိုးအဖြစ် ဖော်မတ်ထားသည့် စကားရပ်ကို ပြန်ပေးသည်။
အထားအသို
FormatCurrency(Expression[,NumDigAfterDec[,
IncLeadingDig[,UseParForNegNum[,GroupDig]]]])
Parameter | Description |
---|---|
expression | Required. The expression to be formatted |
NumDigAfterDec | Optional. Indicates how many places to the right of the decimal are displayed. Default is -1 (the computer's regional settings are used) |
IncLeadingDig | Optional. Indicates whether or not a leading zero is
displayed for fractional values:
|
UseParForNegNum | Optional. Indicates whether or not to place negative
values within parentheses:
|
GroupDig | Optional. Indicates whether or not numbers are grouped
using the group delimiter specified in the computer's regional settings:
|
ဥပမာများ
ဥပမာ ၁
<%
response.write(FormatCurrency(20000))
%>
အထက်ဖော်ပြပါ ကုဒ်၏ အထွက်သည်-
$20,000.00
ဥပမာ ၂
ဒဿမ အရေအတွက် သတ်မှတ်ခြင်း-
<%
response.write(FormatCurrency(20000,2) & "<br />")
response.write(FormatCurrency(20000,5))
%>
အထက်ဖော်ပြပါ ကုဒ်၏ အထွက်သည်-
$20,000.00
$20,000.00000
ဥပမာ ၃
သုည ဦးဆောင်သည့် သို့မဟုတ် မရှိသော အပိုင်းကိန်းတန်ဖိုးများ-
<%
response.write(FormatCurrency(.20,,0) & "<br />")
response.write(FormatCurrency(.20,,-1))
%>
အထက်ဖော်ပြပါ ကုဒ်၏ အထွက်သည်-
$.20
$0.20
ဥပမာ ၄
ကွင်းအတွင်းရှိ အနုတ်လက္ခဏာတန်ဖိုးများ ရှိသည်ဖြစ်စေ မရှိသည်-
<%
response.write(FormatCurrency(-50,,,0) & "<br />")
response.write(FormatCurrency(-50,,,-1))
%>
အထက်ဖော်ပြပါ ကုဒ်၏ အထွက်သည်-
-$50.00
($50.00)
ဥပမာ ၅
ဒေါ်လာတစ်သန်းကို အုပ်စုဖွဲ့ခြင်း ရှိ၊ မရှိ၊
<%
response.write(FormatCurrency(1000000,,,,0) & "<br />")
response.write(FormatCurrency(1000000,,,,-1))
%>
အထက်ဖော်ပြပါ ကုဒ်၏ အထွက်သည်-
$1000000.00
$1,000,000.00
❮ VBScript အကိုးအကားကို အပြီးသတ်ပါ။