Java Time Format FormatTime(String strTime, char TimeSepartor)

Here you can find the source of FormatTime(String strTime, char TimeSepartor)

Description

Format Time

License

Open Source License

Declaration


public static String FormatTime(String strTime, char TimeSepartor)

    

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static String FormatTime(String strTime, char TimeSepartor)

    {//w  w w .  ja  v  a 2 s  .  c o m

        String strOutTime;

        if (strTime.length() != 6)

            return strTime;

        strTime = strTime.substring(0, 2) + TimeSepartor + strTime.substring(2, 4) + TimeSepartor
                + strTime.substring(4);

        strOutTime = strTime;

        return strOutTime;

    }
}

Related

  1. formatTime(long timeInMilli)
  2. formatTime(long timeInSecond)
  3. formatTime(long timeInterval, int maxTerms)
  4. formatTime(long timeMillis)
  5. formatTime(long value)
  6. formatTime(String time)
  7. formatTime(String time)
  8. formatTime(String time)
  9. formatTime(String time)