[Gambas-user] Money type in correct representation PT_BR

Stefano Palmeri stefanopalmeri at ...152...
Tue Sep 12 16:49:33 CEST 2006


Alle 15:14, martedì 12 settembre 2006, Fabricio Silva ha scritto:
> Ok I undestood,
> 
> But what abou the initial problem: replacing the dot for a comma when
> showing data in a tableview?
> 
> Regards Fabrício

If I understood, you mean replacing the last dot with a comma.
This method works only if your value has ALWAYS the last two
decimals.

PUBLIC SUB Main()
  
  DIM sPrice AS String
  
  'this a wrong value
  sPrice = "1,234,56"
  
  'first, we replace all commas with dots
  sPrice = Replace$(sPrice, ",", ".")
  
  'then we replace the last dot with a comma
  sPrice = Left$(sPrice, Len(sPrice) - 3) & "," & Right$(sPrice, 2)
  
  PRINT sPrice
    
END






> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job 
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 




More information about the User mailing list