Java SQL Date Get getDate(Date date)

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

Description

get Date

License

Apache License

Declaration

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

Method Source Code

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

import java.util.Calendar;

import java.util.Date;

public class Main {

    public static java.sql.Date getDate(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);/*from   w ww . j a  v  a 2s .c om*/
        return new java.sql.Date(cal.getTimeInMillis());
    }
}

Related

  1. getDate()
  2. getDate()
  3. getDate()
  4. getDate()
  5. getDate(Calendar pCal)
  6. getDate(Date value)
  7. getDate(final int year, final int month, final int day)
  8. getDate(final String value)
  9. getDate(Map m, String key)