Find Weeknumber for a Given Date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • svpriyan
    New Member
    • Apr 2009
    • 18

    #1

    Find Weeknumber for a Given Date

    Hai Buddies,
    In my data, i have starting date from jan 25th 2007 to june 2008. seems more than 1 year.
    I wanted to put week number for each of this week starting like week1 , week2.., Now i got confused after 52 weeks, it will be week53 not week1 again.
    Could any1 help me to find a good idea for me
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by svpriyan
    Hai Buddies,
    In my data, i have starting date from jan 25th 2007 to june 2008. seems more than 1 year.
    I wanted to put week number for each of this week starting like week1 , week2.., Now i got confused after 52 weeks, it will be week53 not week1 again.
    Could any1 help me to find a good idea for me
    Have you tried the get(Calendar.WE EK_OF_YEAR) method in the Calendar class? It handles all the nitty-gritty details.

    kind regards,

    Jos

    Comment

    Working...