java.sql.Date example

java.sql.Date contains only information about the date part (year, month, day).  Here is an example to use java.sql.Date

Calendar calendar = Calendar.getInstance();
//calendar.set(Calendar.HOUR_OF_DAY, 0);
//calendar.set(Calendar.MINUTE, 0);
//calendar.set(Calendar.SECOND, 0);
//calendar.set(Calendar.MILLISECOND, 0);
Date date = new Date(calendar.getTime().getTime());

Comments

Popular posts from this blog

How to get Active Transactions and Locks from MySQL

Example of a PAC file