db2
Class.forName("com.ibm.db2.DB2Driver");
String url = "jdbc:db2://localhost:port/databaseName";
DriverManager.getConnection(url,username,password);
SimpleDateFormat dayFormatter = new SimpleDateFormat("yyyy-MM-dd-");
Calendar lastDay = new GregorianCalendar();
lastDay.add(Calendar.DATE-1);
String startTime = dayFormatter.format(lastDay.getTime())+"00.00.00.000000";
String endTime = dayFormatter.format(lastDay.getTime())+"23.59.59.999999";