I need to convert new Date() to Julian date format.is there is any build in java function for this. my exact requirement is
Represents the creation date of the file in
Actually I think what you need is
String yearYy = new SimpleDateFormat("yy").format(today)
String dayD = new SimpleDateFormat("D").format(today)
String dayDDD = dayD.padLeft(3,'0')
String julianDateString = yearYy + dayDDD
This gives the proper Julian date format - there shouldn't be a leading '0', but you do need to pad the day number so that it's always 3 characters.
...I'm quite sure this could be simplified, but the important thing is that the day number should be padded.
So 20/01/21 gives 21020
(rather than 02120
when using the previous example)