Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: return a day of the year

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default return a day of the year

    Hi, sorry for the bad english but i'm italian.

    if the thread is in the wrong place change it.

    I need a method or functions to return a day of the year passing the day, month and year,for example:

    if i pass 1/02/2010 the functions returns 32, if i pass 1/01/2010 the functions returns 1, etc.

    EDIT:

    I'm a stupid, i've solved the problem, i used GregorianCalendar, it was very simple.
    Last edited by lipry; January 23rd, 2011 at 06:02 AM. Reason: SOLVED


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 286 Times in 225 Posts
    Blog Entries
    4

    Default Re: return a day of the year

    Hello lipry,

    Welcome to the forums.

    I'm glad you solved your problem.

    For those who may be interested in this - GregorianCalendar (Java Platform SE 6)
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  3. #3
    Junior Member
    Join Date
    Jan 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: return a day of the year

    Thanks for the reply...

    I and my firends have created a software for manage a hotel, it was the first time we have used a GregorianCalendar! today we've programmed for 11 hours!

  4. #4
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 286 Times in 225 Posts
    Blog Entries
    4

    Default Re: return a day of the year

    Cool. That sounds like some serious coding!
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

Similar Threads

  1. Return from incrementing for loop?
    By mindlessn00b in forum Loops & Control Statements
    Replies: 16
    Last Post: October 4th, 2010, 12:15 PM
  2. Leap year program
    By cyspope in forum What's Wrong With My Code?
    Replies: 4
    Last Post: September 22nd, 2010, 10:20 PM
  3. need idea for final year project
    By asadkhan in forum Java Applets
    Replies: 0
    Last Post: August 22nd, 2010, 01:36 AM
  4. Getting date based on days past year
    By aussiemcgr in forum Java Theory & Questions
    Replies: 3
    Last Post: July 14th, 2010, 04:06 PM
  5. Day,Month,Year Concatenation Error
    By srinivasan_253642 in forum JDBC & Databases
    Replies: 1
    Last Post: January 22nd, 2010, 03:40 AM

Tags for this Thread