Java SQL Date to Util Date toUtilDate(Date date)

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

Description

Converts the given to java.sql.Date to java.util.Date.

License

Open Source License

Parameter

Parameter Description
date The java.util.Date to be converted to java.sql.Date.

Return

The converted java.sql.Date.

Declaration

public static java.util.Date toUtilDate(Date date) 

Method Source Code


//package com.java2s;

import java.sql.*;

public class Main {
    /**/*from   w w  w.j  a va2s  .  c o  m*/
     * Converts the given to java.sql.Date to java.util.Date.
     *
     * @param date The java.util.Date to be converted to java.sql.Date.
     * @return The converted java.sql.Date.
     */
    public static java.util.Date toUtilDate(Date date) {
        return (date != null) ? new java.util.Date(date.getTime()) : null;
    }
}

Related

  1. toUtilDate(java.sql.Date d)
  2. toUtilDate(java.sql.Date date)
  3. toUtilDate(String sDate, String format)
  4. toUtilDateFromSqlDate(java.sql.Date p_sqlDate)