[improvement][project]Optimize certain code structures.

This commit is contained in:
jerryjzhang
2024-09-21 18:13:31 +08:00
parent 4193b84e83
commit ae889bb0ae
8 changed files with 26 additions and 68 deletions

View File

@@ -55,7 +55,7 @@ public class S2SqlDateHelper {
private static String reformatDate(String dateStr, String format) {
try {
// Assuming the input date format is "yyyy-MM-dd"
SimpleDateFormat inputFormat = new SimpleDateFormat(DateUtils.DATE_FORMAT);
SimpleDateFormat inputFormat = new SimpleDateFormat(DateUtils.DEFAULT_DATE_FORMAT);
Date date = inputFormat.parse(dateStr);
SimpleDateFormat outputFormat = new SimpleDateFormat(format);
return outputFormat.format(date);