Java Time Now getCurrTime()

Here you can find the source of getCurrTime()

Description

get Curr Time

License

Apache License

Declaration

public static String getCurrTime() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String getCurrTime() {
        Date now = new Date();
        SimpleDateFormat outFormat = new SimpleDateFormat("yyyyMMddHHmmss");
        String s = outFormat.format(now);
        return s;
    }//from   w  w w . j  av  a  2s .co  m

    public static String format(Date date, String pattern) {
        if (date == null) {
            return "";
        }
        SimpleDateFormat df = new SimpleDateFormat(pattern);
        return df.format(date);
    }
}

Related

  1. getCurDateTime()
  2. getCurDateTIme()
  3. getCurentTimeDirsPath()
  4. getCurrDateTime()
  5. getCurrSysTime()
  6. getCurrTime()
  7. getCurTime()
  8. getCurTimeStr()
  9. getDBCurrentTime()