//write database int year = 2005; int month = 05; int day = 18; int hour = 22; int miniute = 52; Calendar c = Calendar.getInstance(); c.set(year,month-1,day,hour,miniute);//read database int y = c.get(Calendar.YEAR); int m = temployeeBasicInfo5.getEmployeeEntertime().get(Calendar.MONTH)+1; int d = temployeeBasicInfo5.getEmployeeEntertime().get(Calendar.DATE); int h = temployeeBasicInfo5.getEmployeeEntertime().get(Calendar.HOUR_OF_DAY); int min = temployeeBasicInfo5.getEmployeeEntertime().get(Calendar.MINUTE);希望对你有帮助
看看javadoc吧
ca.......
剩下的看api就知道了,没什么好说的
int year = 2005;
int month = 05;
int day = 18;
int hour = 22;
int miniute = 52;
Calendar c = Calendar.getInstance();
c.set(year,month-1,day,hour,miniute);//read database
int y = c.get(Calendar.YEAR);
int m = temployeeBasicInfo5.getEmployeeEntertime().get(Calendar.MONTH)+1;
int d = temployeeBasicInfo5.getEmployeeEntertime().get(Calendar.DATE);
int h = temployeeBasicInfo5.getEmployeeEntertime().get(Calendar.HOUR_OF_DAY);
int min = temployeeBasicInfo5.getEmployeeEntertime().get(Calendar.MINUTE);希望对你有帮助