Forum Moderators: open
I have a ASP script that displays the date for the week begining of each week. For example if i was to execute the script today (Tuesday 06 January) the script will display the week begining as 05-01-04
it basically displays the week begining monday. i've made the script link to a blank script and add a digit to it. So for example if i wanted to know the date for sunday, the script links to test.asp?day=6 and that way the test.asp can add 6 to the the week begining date.
But the problem i am having is that if the week begining in lets say 29th and i add 6 to that, it will give me the date as being 35th which is well out of the calendar. Also, some months have 29, some have 30 and some have 31, so i need to be able to have this validation.
Can anyone please help me achive this.
Many thanx in advance
NewDate = DateAdd("d", Request.QueryString("day"), Now())