正在显示
1 个修改的文件
包含
10 行增加
和
0 行删除
@@ -49,6 +49,15 @@ public final class DateUtil { | @@ -49,6 +49,15 @@ public final class DateUtil { | ||
49 | return date; | 49 | return date; |
50 | } | 50 | } |
51 | 51 | ||
52 | + public static Date fromatByyyMMdd_hhmmssSSS(String dateStr) throws ParseException { | ||
53 | + | ||
54 | + SimpleDateFormat dfs = new SimpleDateFormat("yyyyMMddHHmmssSSS"); | ||
55 | + Date parse = dfs.parse(dateStr); | ||
56 | + | ||
57 | + return parse; | ||
58 | + | ||
59 | + } | ||
60 | + | ||
52 | public static String getDDTM(){ | 61 | public static String getDDTM(){ |
53 | return timesdf.format(currentDate); | 62 | return timesdf.format(currentDate); |
54 | } | 63 | } |
@@ -63,6 +72,7 @@ public final class DateUtil { | @@ -63,6 +72,7 @@ public final class DateUtil { | ||
63 | return convertLDTToDate(dateTime); | 72 | return convertLDTToDate(dateTime); |
64 | } | 73 | } |
65 | 74 | ||
75 | + | ||
66 | //LocalDateTime转换为Date | 76 | //LocalDateTime转换为Date |
67 | public static Date convertLDTToDate(LocalDateTime time) { | 77 | public static Date convertLDTToDate(LocalDateTime time) { |
68 | return Date.from(time.atZone(ZoneId.systemDefault()).toInstant()); | 78 | return Date.from(time.atZone(ZoneId.systemDefault()).toInstant()); |
-
请 注册 或 登录 后发表评论