diff --git a/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java b/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java index 6caf017d19..3a9582c031 100644 --- a/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java @@ -1074,7 +1074,7 @@ public class DorisQueryProvider extends QueryProvider { if (field.getDeType() == 1) { String format = transDateFormat(request.getDateStyle(), request.getDatePattern()); if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5 || field.getDeExtractType() == 1) { - whereName = String.format(DorisConstants.STR_TO_DATE, originName, format); + whereName = String.format(DorisConstants.DATE_FORMAT, originName, format); } if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { String cast = String.format(DorisConstants.CAST, originName, DorisConstants.DEFAULT_INT_FORMAT) + "/1000"; @@ -1115,7 +1115,7 @@ public class DorisQueryProvider extends QueryProvider { whereName = "upper(" + whereName + ")"; } else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) { if (request.getDatasetTableField().getDeType() == 1) { - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String startTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(0)))); String endTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(1)))); whereValue = String.format(DorisConstants.WHERE_BETWEEN, startTime, endTime);