Java Date Now getCurrentDateMMDDYYYY()

Here you can find the source of getCurrentDateMMDDYYYY()

Description

Gets current date.

License

Apache License

Return

current date in MM/DD/YYYY format

Declaration

public static String getCurrentDateMMDDYYYY() 

Method Source Code


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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**/*from  w w w .j  a v  a  2 s.  c  o  m*/
     * Gets current date.
     * 
     * @return current date in MM/DD/YYYY format
     */
    public static String getCurrentDateMMDDYYYY() {
        Date date = new Date();

        SimpleDateFormat MM_DD_YYYY_FORMAT = new SimpleDateFormat("MM/dd/yyyy");
        String currentDate = MM_DD_YYYY_FORMAT.format(date);

        return currentDate;
    }
}

Related

  1. getCurrentDateInMillis()
  2. getCurrentDateInSqlFormat()
  3. getCurrentDateINYYYY_MM_DD()
  4. getCurrentDateInyyyyMMddFormat()
  5. getCurrentDateINYYYYMMDDHHMMSSwithColons()
  6. getCurrentDateSlashStr()
  7. getCurrentDateStr()
  8. getCurrentDateStr()
  9. getCurrentDateStr()