• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

plz help me, with Calendar problem..

 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • 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
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks a lot, dude...
It was a nice way of solving my problem..
cheers
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic