Results 1 to 3 of 3
  1. #1
    MetalR0 is offline Member
    Join Date
    Jul 2011
    Rep Power

    Default need to adjust time

    What is a good way to turn standard time into an integer? In other words i need
    String 4:30 to become int 430. The parse String method just turns the : into a , and I can't find a method that will just remove the : from a String. Suggestions?
    Last edited by MetalR0; 07-24-2011 at 07:22 PM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    Look in the API doc for the String class's methods. There are some that will do what you want.
    You could use one method to find the location of the ":" and another to get the part before and the part after where the ":" was located.
    There is another that could replace the ":" with an empty string.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

Similar Threads

  1. Adjust scrolling in canvas
    By lipkee85 in forum Java Applets
    Replies: 1
    Last Post: 08-22-2010, 03:29 AM
  2. Replies: 1
    Last Post: 07-19-2010, 12:31 AM
  3. Replies: 14
    Last Post: 09-18-2009, 04:48 AM
  4. Replies: 2
    Last Post: 07-29-2009, 12:23 PM
  5. How To:Use a JSlider to adjust Text size in a JPanel
    By louiebagz in forum AWT / Swing
    Replies: 2
    Last Post: 07-01-2007, 07:37 AM

Posting Permissions

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