i want to do DATENAME(q, getDate()) the same in Java. this command works fine in sql server, i want to replicate the same process in java
i tried
Integer quater = (new LocalDate().getMonthOfYear()/3)+1;
System.out.println(quater);
Expected Result : 4
obtain Result : 4
Integer quater = (new LocalDate(2013,9,10).getMonthOfYear()/3)+1;
System.out.println(quater);
Expected Result : 3
obtain Result : 4
please let me know exact command to get this.