Java SQL Date Create convertToDatabaseDate(Date date)

Here you can find the source of convertToDatabaseDate(Date date)

Description

convert To Database Date

License

Open Source License

Declaration

public static java.sql.Date convertToDatabaseDate(Date date) 

Method Source Code

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

import java.util.Date;

public class Main {
    public static java.sql.Date convertToDatabaseDate(Date date) {
        if (date == null)
            return null;

        return new java.sql.Date(date.getTime());
    }/*  www.  j ava 2s.  c  o  m*/
}

Related

  1. convertSqlDateToJavaDate(java.sql.Date sqlDate)
  2. convertSQLDateToUtilDate(java.sql.Date date)
  3. convertSqlUtil(java.util.Date d)
  4. convertStringToSql(final String dateStr)
  5. convertToCalendar(Date date)
  6. convertToDate(Object o)
  7. convertToMySqlDate(Date date)
  8. convertToSDate(java.util.Date uDate)
  9. convertToSqlDate(Calendar calendar)