How to find the date of the first day of the week, taking into account any date range of this week in vb6

How can I find the date of the first day of the week, given any date of the current week in vb6 or classic asp?

+4
source share
1 answer

Weekday(date)

This returns an int between 1 and 7 to go to the sun. With this, it's easy to get the date of the first day, but first you need to determine the first day, assuming Sunday ...

DateAdd("d", -Weekday(date)+1, date)

+5
source

Source: https://habr.com/ru/post/1344211/


All Articles