Results 1 to 3 of 3
  1. #1
    renu is offline Senior Member
    Join Date
    May 2010
    Posts
    119
    Rep Power
    0

    Question Is their any method which converts a Julian date to an actual date.

    Hi

    I have to program , given a number say 145 i should get back 25-May-06

    Can any one tell me ,is their any built in method which takes a julian date and gives an actual date .

    or any help with, how to code to get the actual date

    Thanks
    renu

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    28

    Default

    Have you tried using GregorianCalendar's set method and the appropriate constant, Calendar.DAY_OF_YEAR? Then you can change the Calendar object into a Date via the getTime() method. If you need to format the output further, use a SimpleDateFormat object.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,299
    Blog Entries
    7
    Rep Power
    24

    Default

    Look here.

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

Similar Threads

  1. Compare Mysql date with current date
    By gioarvan in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 04-24-2011, 05:19 PM
  2. converting string (GMT date) to date in US time.
    By JRuyechan in forum New To Java
    Replies: 1
    Last Post: 10-15-2010, 07:07 AM
  3. julian date to full date format
    By judy318 in forum New To Java
    Replies: 7
    Last Post: 11-02-2009, 01:17 PM
  4. Compare date input to database with current date
    By hungleon88 in forum Advanced Java
    Replies: 2
    Last Post: 11-25-2008, 09:10 AM
  5. Creating a Gregorian Calendar using a Date object gives date - 1
    By prachi_goliwadekar in forum New To Java
    Replies: 1
    Last Post: 05-08-2008, 08:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •