Capture mondays in ASP

Results 1 to 2 of 2

Thread: Capture mondays in ASP

  1. #1
    Join Date
    Dec 1969

    Default Capture mondays in ASP

    Hello all,<BR>Is there any function that I can capture the days of every Monday of the week? For example, a user after logging in, it will show the date of Monday of this current week?<BR><BR>Thanks.<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Can't do it in ASP...

    ...because ASP isn&#039;t a language. It doesn&#039;t even know there is such a thing as a Monday.<BR><BR>You can *easily* do it in VBScript, though.<BR><BR>[I know, I know...a pedantic answer. But I&#039;ll try to redeem myself.]<BR><BR>&#060;%<BR>mondayThisWeek = Date() - Weekday(Date()) + vbMonday<BR>%&#062;<BR><BR>Note that if you do that on Sunday, it will give you Monday, the *next day*. That&#039;s because weeks are defined as ranging from Sunday to Saturday, by default. Look at the docs for the Weekday() function to see how to change that default.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts