Here you can find the source of convertDateToString(java.sql.Date argDate)
Parameter | Description |
---|---|
argDate | a parameter |
public static String convertDateToString(java.sql.Date argDate)
//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; } }