1 Reply Latest reply: Nov 2, 2006 6:03 AM by 807607 RSS

    How to convert the Calender Date to Julian Date ?

    807607
      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