Java SQL Date From GetCurrFormattedDateTime(String strFormatTo)

Here you can find the source of GetCurrFormattedDateTime(String strFormatTo)

Description

Get Curr Formatted Date Time

License

Open Source License

Return

String

Declaration

public static String GetCurrFormattedDateTime(String strFormatTo) 

Method Source Code

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

import java.text.SimpleDateFormat;

public class Main {
    /**/* w  w  w  .ja  v  a2s . c  o m*/
     *
     * @return String
     */
    public static String GetCurrFormattedDateTime(String strFormatTo) {
        java.sql.Timestamp date = new java.sql.Timestamp(
                System.currentTimeMillis());
        SimpleDateFormat formatter = new SimpleDateFormat(strFormatTo);
        return formatter.format(date);
    }
}

Related

  1. getCurrentTime()
  2. getCurrentTime()
  3. getCurrentTime()
  4. getCurrentTime(String format)
  5. getCurrentTimeMillis()
  6. getCurrTime()
  7. getCurTime()
  8. getDatabaseLocalTime(Time databaseDate)
  9. getDateTime()