Here you can find the source of convertDatabaseDateToUSTime(LocalDateTime databaseDate)
public static String convertDatabaseDateToUSTime(LocalDateTime databaseDate)
//package com.java2s; //License from project: Open Source License import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class Main { public static String convertDatabaseDateToUSTime(LocalDateTime databaseDate) { if (databaseDate != null) { return databaseDate.format(DateTimeFormatter.ofPattern("hh:mm a")); } else {/* ww w . j av a 2 s . co m*/ return ""; } } }