• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

plz help me, with Calendar problem..

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi e'body...
Well.. my objective is to get the date of the corrosponding SUN or MON or..
according to the situation, when i am given a date
ok, let me consider that i am given a date: 09/29/2003, and to find the corrosponding SUN in that week, this is the code that i have written :
the answer should have been 09/28/2003

But I am getting 09/07/2003, which is the first SUNDAY of the month.. NOT the corrosponding SUNDAY of that week..which is 09/28/2003
Can anybody help me, on what the problem is,..??
It would be great, if anybody can help me, on this issue..
Thanks again
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this (for Mondays, DAY_OF_WEEK + 1 becomes DAY_OF_WEEK + 2)
 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot, dude...
It was a nice way of solving my problem..
cheers
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic