List of usage examples for java.time.temporal ChronoField AMPM_OF_DAY
ChronoField AMPM_OF_DAY
To view the source code for java.time.temporal ChronoField AMPM_OF_DAY.
Click Source Link
From source file:Main.java
public static void main(String[] args) { LocalDateTime now = LocalDateTime.now(); System.out.println(now.get(ChronoField.YEAR)); System.out.println(now.get(ChronoField.MONTH_OF_YEAR)); System.out.println(now.get(ChronoField.DAY_OF_MONTH)); System.out.println(now.get(ChronoField.HOUR_OF_DAY)); System.out.println(now.get(ChronoField.HOUR_OF_AMPM)); System.out.println(now.get(ChronoField.AMPM_OF_DAY)); }