茕茕白兔,东走西顾。衣不如新,人不如故。
D5KYY8.jpg

LazyBoy

Many ideas, too lazy to carry them out.

yY6nJI.png

JAVA如何根据Date对象获取时间是上午还是下午?

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
String format = simpleDateFormat.format(date);
if(Integer.parseInt(format)<12){
rows.createCell(6).setCellValue("上午");
}else {
rows.createCell(6).setCellValue("下午");
}
posted @ 2020-10-22 11:37  lazyeye  阅读(869)  评论(0)    收藏  举报