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

    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 08:22 PM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    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
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Adjust scrolling in canvas
    By lipkee85 in forum Java Applets
    Replies: 1
    Last Post: 08-22-2010, 04:29 AM
  2. Replies: 1
    Last Post: 07-19-2010, 01:31 AM
  3. Replies: 14
    Last Post: 09-18-2009, 05:48 AM
  4. Replies: 2
    Last Post: 07-29-2009, 01: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, 08: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
  •