Java Date Now getCurrentTimeAndDate()

Here you can find the source of getCurrentTimeAndDate()

Description

Returns the current time and date in a formatted string.

License

Open Source License

Return

The string containing time and date.

Declaration

public static final String getCurrentTimeAndDate() 

Method Source Code

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

public class Main {
    /**/*from w  w  w  .j  av  a2  s .  co m*/
     * Returns the current time and date in a formatted string.
     * @return The string containing time and date.
     */
    public static final String getCurrentTimeAndDate() {
        return java.text.DateFormat.getDateTimeInstance().format(new java.util.Date());
    }
}

Related

  1. getCurrentTime(String pattern)
  2. getCurrentTime(String pattern)
  3. getCurrentTime(String pattern)
  4. getCurrentTime(String timeFormat)
  5. getCurrentTime2MysqlDateTime()
  6. getCurrentTimeAsNumber()
  7. getCurrentTimeAsString()
  8. getCurrentTimeForFileName()
  9. getCurrentTimeForLog()