Commit e60f3c92 by 吴延飞

增加获取当前月分区值的工具方法getCurrentMonthPartition

parent 733b30ff
......@@ -1053,6 +1053,18 @@ public class DateUtils {
}
/**
* 获取当前月的分区值,
* 格式 yyyyMM
* 例如 202211
* @return
*/
public static String getCurrentMonthPartition() {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMM");
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
return simpleDateFormat.format(new Date());
}
/**
* 获取当前日期时间
*
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment