Android Time Parse toStandardTime(String compactTime)

Here you can find the source of toStandardTime(String compactTime)

Description

to Standard Time

Declaration

public static String toStandardTime(String compactTime) 

Method Source Code

//package com.java2s;

public class Main {
    public static String toStandardTime(String compactTime) {
        if (compactTime.trim().length() < 14) {
            return "";
        } else {//from  ww w . j  a v  a 2  s.  c  o m
            return String.format("%s-%s-%s %s:%s:%s",
                    compactTime.substring(0, 4),
                    compactTime.substring(4, 6),
                    compactTime.substring(6, 8),
                    compactTime.substring(8, 10),
                    compactTime.substring(10, 12),
                    compactTime.substring(12, 14));
        }
    }
}

Related

  1. str2Time(String str)
  2. str2TimeMillis(String str)
  3. time(String tag)
  4. toModifiedTimeDate(double modDouble)
  5. toModifiedTimeDate(String modified)