Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to convert the Calender Date to Julian Date ?

807607Nov 1 2006 — edited Nov 2 2006
Hi can any onw help me out to convert the current date to julian date using java api???
i have tryied hard for the solution using GregorianCalender and SimpleDateFormat but still not able to conver the date to the julian date

i have used the follwing method to do so ...
GregorianCalendar calendar = new GregorianCalendar();

SimpleDateFormat sdf = new SimpleDateFormat(
"yyyy.MM.dd G 'at' hh:mm:ss z");
Date date = new Date(Long.MAX_VALUE);
System.out.println("Formated date " + sdf.format(date));
calendar.setGregorianChange(date);
Date date1 = calendar.getGregorianChange();
System.out.println("Formated date1 " + sdf.format(date1));
}

but not geting the current date so if any one knw about the same then plz let me knw ASAP

Thanks and Regards
Tushar

refere http://forum.java.sun.com/thread.jspa?threadID=781981

Message was edited by:
lad_tushar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2006
Added on Nov 1 2006
1 comment
245 views