Java Time Now getNow()

Here you can find the source of getNow()

Description

get Now

License

Open Source License

Declaration

public static String getNow() 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final String YYYYMMDDHHMMSS_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public static String getNow() {
        return new SimpleDateFormat(YYYYMMDDHHMMSS_FORMAT).format(new Date());
    }//from   w ww.j a  v a 2s.  c  om
}

Related

  1. getNow()
  2. getNow()
  3. getNow()
  4. getNow()
  5. getNow()
  6. getNow(boolean ifdatetime)
  7. getNow(final String format)
  8. getNow(String format)
  9. getNowAsNICSDate()