Java SQL Time From toDateTimeString(java.util.Date inDate)

Here you can find the source of toDateTimeString(java.util.Date inDate)

Description

Description of the Method

License

Open Source License

Parameter

Parameter Description
inDate Description of the Parameter

Return

Description of the Return Value

Declaration

public static String toDateTimeString(java.util.Date inDate) 

Method Source Code

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

public class Main {
    /**//  w w  w. j a v  a  2s  .  c o m
     * Description of the Method
     *
     * @param inDate Description of Parameter
     * @return Description of the Returned Value
     */
    public static String toDateTimeString(java.sql.Timestamp inDate) {
        try {
            return java.text.DateFormat.getDateTimeInstance(java.text.DateFormat.SHORT, java.text.DateFormat.LONG)
                    .format(inDate);
        } catch (NullPointerException e) {
        }
        return "";
    }

    /**
     * Description of the Method
     *
     * @param inDate Description of the Parameter
     * @return Description of the Return Value
     */
    public static String toDateTimeString(java.util.Date inDate) {
        try {
            return java.text.DateFormat.getDateTimeInstance(java.text.DateFormat.SHORT, java.text.DateFormat.LONG)
                    .format(inDate);
        } catch (NullPointerException e) {
        }
        return "";
    }
}

Related

  1. getDateTimeStringFromCalendar(Calendar calendar)
  2. getDateTimeTypeString(Connection conn)
  3. getDateTimeTypeString(Connection conn)
  4. toDateTime(final java.util.Date d)
  5. toDatetime(long value)
  6. toSQLTime(final LocalTime lt)
  7. toSqlTime(long date)
  8. toTime(Date value)
  9. toTime(final Date date)