Java Time Now getnowTime()

Here you can find the source of getnowTime()

Description

getnow Time

License

Open Source License

Declaration


public static String getnowTime() 

Method Source Code

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

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

public class Main {
    public static final String SHORT_TIME_FORMAT = "yyyy-MM-dd";

    public static String getnowTime() {
        SimpleDateFormat df = new SimpleDateFormat(SHORT_TIME_FORMAT);
        String nowtime = df.format(Calendar.getInstance().getTime());
        return nowtime;
    }//from   w w w  .j av  a  2  s  . c o  m
}

Related

  1. getNowStr()
  2. getNowStrDateVerbose()
  3. getNowString()
  4. getNowString()
  5. getNowString(String pattern)
  6. getNowTime()
  7. getNowTime()
  8. getNowTime()
  9. getNowTime()