• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to convert Julian Date into Calendar Date  RSS feed

 
kishoret tata
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want convert julian Date to calendar Date (mm/dd/yyyy or mm/dd/yy format) in java.
Can any one help me how to convert julian date to calendar Date.
Thanks,
Krishore.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The term "Julian date" is ambiguous. Do you want a date in the Julian calendar, the one which predated the Gregorian Calendar? Or do you want a Julian day number, which is the number of days elapsed since noon on 1 January 4713 B.C. (GMT). These are unrelated concepts, named after two different people. We can't provide a better answer without knowing which you mean. You may want to check out this post however.
 
kishoret tata
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have dates like
date1=1999046
date2=1987035 etc...
Now I need to convert these days into Calendar date format like 'MM/DD/YYYY' .
Please can any one help me.
Thanks.
 
kishoret tata
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have dates like
date1=1999046
date2=1987035 etc...
Now I need to convert these days into Gregorian Calendar date format like 'MM/DD/YYYY' .
Please can any one help me.
Thanks.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
date1=1999046
Well, what does this mean? I guess the 1999 is the year, right? What's the 046? Number of days since beginning of the year maybe? SimpleDateFormat can handle that:

prints:
 
kishoret tata
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, That's true.
date1=1999046
Here 1999 is the year and 046 is Number of days since beginning of the year.
Thanks for your help ...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!