Normal Topic [Solved] Format currency in text field (Read 496 times)
CapitalG
Full Member
Members
***
Offline



Posts: 143
Location: Phoenix, Arizona
Joined: Mar 4th, 2003
[Solved] Format currency in text field
Feb 4th, 2008 at 9:52pm
Print Post Print Post  
I have the following code:


If NoteDiscount > 0 then
{
     PurchasePriceRepresents = "which reflects the principal balance less a discount of $" + NoteDiscount
}
Else
{      
     PurchasePriceRepresents = ""
}


When an amount is entered into the NoteDiscount field(Field Type = Money), the PurchasePriceRepresents field(Field Type = Text) displays as programmed with the NoteDiscount amount having 4 decimal places and no commas.  I understand why it is doing this, but is there a way in the programming to limit it to 2 decimal places and include commas?
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Format currency in text field
Reply #1 - Feb 4th, 2008 at 9:58pm
Print Post Print Post  
@AsFormattedByLE()
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
CapitalG
Full Member
Members
***
Offline



Posts: 143
Location: Phoenix, Arizona
Joined: Mar 4th, 2003
Re: Format currency in text field
Reply #2 - Feb 4th, 2008 at 10:07pm
Print Post Print Post  
Thank you Cheesy
  
Back to top
 
IP Logged