Android Time Get getCompactTime()

Here you can find the source of getCompactTime()

Description

get Compact Time

Declaration

public static String getCompactTime() 

Method Source Code

//package com.java2s;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String getCompactTime() {
        Date curDate = new Date(System.currentTimeMillis());
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
        String result = sdf.format(curDate);
        return result;
    }/*from  w w w .  j  av  a2 s .  co  m*/
}

Related

  1. getCurrentTime()
  2. getCurrentTimeStamp()
  3. getNow()
  4. getNow()
  5. now()
  6. getCurrentEpochTime()
  7. getCurrentTime()
  8. getDateTime()
  9. getLongTime()