Here you can find the source of getDateParameter(java.sql.Date date, int param)
public static int getDateParameter(java.sql.Date date, int param)
//package com.java2s; /**/*from ww w . j ava2 s. c o m*/ * Copyright (c) 2013-2015 www.javahih.com * * Licensed under the Apache License, Version 2.0 (the "License"); */ import java.util.Calendar; public class Main { public final static Calendar cal = Calendar.getInstance(); public static int getDateParameter(java.sql.Date date, int param) { if (date == null) { return -1; } cal.setTime(new java.util.Date(date.getTime())); return cal.get(param); } }