Results 1 to 4 of 4

Thread: [Resolved] Add a Leading Zero to an Integer?

Threaded View

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Resolved [Resolved] Add a Leading Zero to an Integer?

    I want to know how to format an integer so that it always displays as two digits, so if the number is 5, it adds a leading 0 as 05. This is to display time. I tried using DecimalFormat, but it doesn't seem to be doing what I want it to, and I get errors half the time.

    Any suggestions?
    Last edited by The Hobo; Dec 8th, 2004 at 03:16 PM. Reason: Resolved
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width