Java SQL Date Create convertDateToString(java.sql.Date argDate)

Here you can find the source of convertDateToString(java.sql.Date argDate)

Description

This method is used to convert date to the specified String format

License

Open Source License

Parameter

Parameter Description
argDate a parameter

Declaration

public static String convertDateToString(java.sql.Date argDate) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

public class Main {
    /**//from  ww w  .  j a  va 2  s  . c  om
     * This method is used to convert date to the specified String format
     * 
     * @param argDate
     * @return
     */
    public static String convertDateToString(java.sql.Date argDate) {
        String strDate = "";
        if (argDate != null) {
            SimpleDateFormat dtFormat = new SimpleDateFormat("MM/dd/yyyy");
            strDate = dtFormat.format(argDate);
        }
        return strDate;
    }
}

Related

  1. convertDateFromSQLDate(java.sql.Date sqlDate)
  2. convertDateFromSqlToUtil(java.sql.Date sqlDate)
  3. convertDateFromString(String inputDateString)
  4. convertDateFromUtilToSql(java.util.Date utilDate)
  5. convertDateIfNecessary(Date date)
  6. convertFormat(java.sql.Date dt, String formatter)
  7. convertFormat(String dateData)
  8. convertiFecha(Date utilFecha)
  9. convertirSQLDate2String(java.sql.Date sqlDate)