Java Time Now getCurDateTIme()

Here you can find the source of getCurDateTIme()

Description

get Cur Date T Ime

License

Apache License

Declaration

public static String getCurDateTIme() 

Method Source Code


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

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Main {
    public static String getCurDateTIme() {
        return new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
    }/*from  w w  w  .  j  a  v  a 2 s  .c o m*/

    public static String format(Calendar calendar) {
        return new SimpleDateFormat("dd-MM-yyyy").format(calendar.getTime());
    }
}

Related

  1. currentTimeString(String pattern)
  2. currtimeToString8()
  3. get_cur_datetime()
  4. getCurDateBefore(long time)
  5. getCurDateTime()
  6. getCurentTimeDirsPath()
  7. getCurrDateTime()
  8. getCurrSysTime()
  9. getCurrTime()