Here you can find the source of create14DigitDateTimeFormat()
public static DateTimeFormatter create14DigitDateTimeFormat()
//package com.java2s; /*/* ww w. j av a 2 s .c om*/ * Copyright 2014-2017, Andrew Lindesay * Distributed under the terms of the MIT License. */ import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import java.util.Locale; import static java.time.temporal.ChronoField.*; public class Main { public static DateTimeFormatter create14DigitDateTimeFormat() { return new DateTimeFormatterBuilder().appendValue(YEAR, 4).appendValue(MONTH_OF_YEAR, 2) .appendValue(DAY_OF_MONTH, 2).appendValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2) .appendValue(SECOND_OF_MINUTE, 2).toFormatter(Locale.ENGLISH).withZone(ZoneOffset.UTC); } }