Java Date Now getCurrentDateAndTimeFormat()

Here you can find the source of getCurrentDateAndTimeFormat()

Description

get Current Date And Time Format

License

Open Source License

Parameter

Parameter Description
aDate a parameter

Declaration


public static String getCurrentDateAndTimeFormat() 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**/*  w ww .j a v  a2  s.  c om*/
     *
     * @param aDate
     * @return
     *
     */
    /*==================================================================*/
    public static String getCurrentDateAndTimeFormat() {
        SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd hh:mm z");
        Date currentDate = new Date(System.currentTimeMillis());
        String myFormattedDate = myFormatter.format(currentDate);
        return myFormattedDate;

    }
}

Related

  1. getCurrentDate2(String format)
  2. getCurrentDate_String()
  3. getCurrentDate_YYYY_MM_DD()
  4. getCurrentDateAllformated()
  5. getCurrentDateAndTime()
  6. getCurrentDateAsNiceString()
  7. getCurrentDateAsNumericEncodedByteArray()
  8. getCurrentDateAsString()
  9. getCurrentDateAsString(DateFormat df)