公会流水统计时间筛选器优化

This commit is contained in:
huangjian
2022-07-18 18:52:52 +08:00
parent 8e469cd22a
commit 2d87c479b4
5 changed files with 159 additions and 62 deletions

View File

@@ -229,6 +229,18 @@ public class TimeUtils {
return result;
}
public static long getTimeMillis(String time, String format) {
try {
SimpleDateFormat formatter = new SimpleDateFormat(format, Locale.getDefault());
Date date = formatter.parse(time);
return date.getTime();
} catch (Exception ex) {
ex.printStackTrace();
}
return 0;
}
/**
* 将毫秒数转为 MM:ss 的格式
*