Java SQL Date From toSqlDate(Date date)

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

Description

to Sql Date

License

Apache License

Declaration

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

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Date;

public class Main {

    public static java.sql.Date toSqlDate(Date date) {
        if (date != null) {
            return new java.sql.Date(date.getTime());
        } else {/*from  w  w w  .  j a  v a2s .com*/
            return null;
        }
    }
}

Related

  1. toDateFromString(String str)
  2. toDateMidnight(java.util.Date d)
  3. toDateStr(java.util.Date d)
  4. toSqlDate(Calendar calendar)
  5. toSqlDate(Date date)
  6. toSqlDate(Date date)
  7. toSqlDate(Date dt)
  8. toSqlDate(final Date date)
  9. toSqlDate(final String _text, final String _dateFormat)