Java Time Format formatTime(String time)

Here you can find the source of formatTime(String time)

Description

format Time

License

Open Source License

Declaration

public static String formatTime(String time) 

Method Source Code

//package com.java2s;

public class Main {

    public static String formatTime(String time) {
        if (time == null || time.trim().length() < 6 || time.trim().equals("000000"))
            return "";

        return time.substring(0, 2) + ":" + time.substring(2, 4) + ":" + time.substring(4, 6);

    }//w  w w. j  a v  a 2 s .com
}

Related

  1. formatTime(long timeMillis)
  2. formatTime(long value)
  3. FormatTime(String strTime, char TimeSepartor)
  4. formatTime(String time)
  5. formatTime(String time)
  6. formatTime(String time)
  7. formatTime(String timeStr)
  8. formatTime14To12String(String time)
  9. formatTime2(long secs)