asp classic - Get the Monday of this week where a week is Mon - Sun (VBScript) -


In VBScript, how can I get to the current week on Monday, assuming one week, Mon-Sun and Not Sun-Satin?

The following code is Sun-Saturn on Monday, so it is close but not quite right:

  get a private function Monday (D) getMonday = DATEADD ("d", 2 - WEEKDAY (d), D) Last Function   

How can I do this without changing the LCID settings?

takes the second argument to specify the first day of the first week of the week.

Therefore date ("D", 1 - V (D, 2), d)

I did not test that my argument is correct but the technique will work for you.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -