Format a long value and convert into String

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benfly08
    New Member
    • Dec 2006
    • 19

    Format a long value and convert into String

    Hi, guys. I have a Long value like 12345678, but i want to format it as 12,345,678 and then convert it into String. I can't find out the way to format a long value like that. Any Hints?
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by benfly08
    Hi, guys. I have a Long value like 12345678, but i want to format it as 12,345,678 and then convert it into String. I can't find out the way to format a long value like that. Any Hints?
    Have a look at the DecimalFormat class.

    kind regards,

    Jos

    Comment

    Working...