From int to Date

Hi all

I have an int that rappresent a number of day of year.

I obtain it with the following code:

Date date = new Date();

date = DateUtil.getDate(pDate, "yyyyMMdd");

Calendar calendar = Calendar.getInstance();

calendar.setTime(date);

int numberOfDay = calendar.get(calendar.DAY_OF_YEAR);

Now the question:

How can i have the day by the int or how can i do the opposite process?

Thank's in advance.

Miche

[480 byte] By [miche79a] at [2007-11-27 0:51:32]
# 1
Hi, calendar.set (Calendar.DAY_OF_YEAR, numberOfDay);date = calendar.getTime();Note: the date year will be the current year.Hope that help,Jack
jack@square6a at 2007-7-11 23:22:25 > top of Java-index,Java Essentials,Java Programming...
# 2
Thank you very much, Jake!You have resolve my problem. I have lost myself in a glass of water, how we said in Italy. I don't know in the other country. ;-)Note: Excuse my English, Jake!
miche79a at 2007-7-11 23:22:25 > top of Java-index,Java Essentials,Java Programming...
# 3
You're welcome. By the way, we are neighbours (I'm french). And I forgive you for the last world cup :)Jack
jack@square6a at 2007-7-11 23:22:25 > top of Java-index,Java Essentials,Java Programming...