Input - Julian Date - "7107" Output - Calendar Date I tried the following code
String julianDate = "7107";
SimpleDateFormat fmt1 = new SimpleDateFormat("yDDD");
Date date = fmt1.parse(julianDate);
SimpleDateFormat fmt2 = new SimpleDateFormat("MM/dd/yyyy");
String output = fmt2.format(date);
System.out.println("Calendar Date : " + output);
But getting wrong output as "Calendar Date : 04/17/0007"
So since folks ask how that single "7" represent year. So even if I give "2017107" as input, representing "YYYYDDD" format . Even then I am getting wrong output.
My expected output for "2017107" julian date is "04/17/2017" .But output is Calendar Date : 11/01/0048
Used Java 7 version