Java Utililty Methods SQL Date to Util Date

List of utility methods to do SQL Date to Util Date

Description

The list of methods to do SQL Date to Util Date are organized into topic(s).

Method

java.util.DatetoUtilDate(Date date)
Converts the given to java.sql.Date to java.util.Date.
return (date != null) ? new java.util.Date(date.getTime()) : null;
DatetoUtilDate(java.sql.Date d)
to Util Date
return new Date(d.getTime());
java.util.DatetoUtilDate(java.sql.Date date)
Convert a java.sql.Date object to a java.util.Date object.
return (java.util.Date) date;
DatetoUtilDate(String sDate, String format)
to Util Date
Date utilDate = null;
try {
    SimpleDateFormat tempDate = new SimpleDateFormat(format);
    utilDate = tempDate.parse(sDate);
} catch (ParseException e) {
    System.out.println("Found error exception while toUtilDate.\n" + e);
return utilDate;
...
java.util.DatetoUtilDateFromSqlDate(java.sql.Date p_sqlDate)
to Util Date From Sql Date
java.util.Date returnDate = null;
if (p_sqlDate != null) {
    returnDate = new java.util.Date(p_sqlDate.getTime());
return returnDate;