Here you can find the source of asDate(java.sql.Date sqlDate)
public static java.util.Date asDate(java.sql.Date sqlDate)
//package com.java2s; //License from project: Apache License public class Main { public static java.util.Date asDate(java.sql.Date sqlDate) { return sqlDate != null ? new java.util.Date(sqlDate.getTime()) : null; }/* w ww. j av a 2 s. c o m*/ public static java.util.Date asDate(java.sql.Timestamp sqlTimestamp) { return sqlTimestamp != null ? new java.util.Date(sqlTimestamp.getTime()) : null; } }