public static String formatDate(String dateStr, String toPattern) {
        if (StringUtils.isBlank(dateStr)) {
            return null;
        }
        LocalDateTime localDateTime = parseDate(dateStr);
        if (localDateTime == null) {
            return null;
        }
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(toPattern);
        return formatter.format(localDateTime);
    }
if raw data has field like create_date or create_time, give it to default partition field.
or give first timestamp or date type field value to default partition field

@param rawData row data
@param schema flink field types
@param partitionPolicy partition policy
@param partitionField partition field
@param timestampPattern timestamp pattern
@return default partition value
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/hive/src/main/java/org/apache/inlong/sort/hive/util/HiveTableUtil.java