Java Time Now getNowDateTime()

Here you can find the source of getNowDateTime()

Description

Gets the now date time.

License

Apache License

Return

the now date time

Declaration

public static String getNowDateTime() 

Method Source Code

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

import java.text.DateFormat;

import java.util.GregorianCalendar;
import java.util.Locale;

public class Main {
    /**/*from  ww  w  .j a  va 2s  .  c  o m*/
     * Gets the now date time.
     *
     * @return the now date time
     */
    public static String getNowDateTime() {
        GregorianCalendar gcNow = new GregorianCalendar();
        java.util.Date dNow = gcNow.getTime();
        DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM,
                Locale.SIMPLIFIED_CHINESE);
        return df.format(dNow);
    }
}

Related

  1. getNowAsNICSDate()
  2. getNowAsString()
  3. getNowDateTime()
  4. getNowDateTime()
  5. getNowDateTime()
  6. getNowDateTime(String strScheme)
  7. getNowDateTimeStrConcise()
  8. getNowDayTimeLong()
  9. getNowDefault()