Here you can find the source of getDateTimeText(LocalDateTime dateTime)
public static String getDateTimeText(LocalDateTime dateTime)
//package com.java2s; //License from project: Open Source License import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class Main { private static final String FORMAT_FULL_DATE = "d MMMM yyyy, h:mm a"; /**/*from w ww . j av a2 s . co m*/ * Gets the complete date time text in the following format: * 12 August 2015, 12:34 PM */ public static String getDateTimeText(LocalDateTime dateTime) { return dateTime.format(DateTimeFormatter.ofPattern(FORMAT_FULL_DATE)); } }