How to prevent auto-generated 'T' letter when parsing String to LocalDateTime using DateTimeFormatterBuilder [duplicate]
问题 This question already has answers here : Can’t rid of 'T' in LocalDateTime (3 answers) Closed 4 months ago . I have this fragment of code to bidirectional parsing String to LocalDateTime: public class ConvertLocalDateToString { private static final DateTimeFormatter CUSTOM_LOCAL_DATE; static { CUSTOM_LOCAL_DATE = new DateTimeFormatterBuilder() .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral('-') .appendValue(MONTH_OF_YEAR, 2) .appendLiteral('-') .appendValue(DAY_OF_MONTH, 2)