Here you can find the source of toUtilDate(Date date)
Parameter | Description |
---|---|
date | The java.util.Date to be converted to java.sql.Date. |
public static java.util.Date toUtilDate(Date date)
//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; } }