How do I find the start date of a week from a specific date?
I have a concern that I want to get the start date of the week from a given date, for example: 15/04/2015 So the start of the week would be: 13/04/2015 (for me, the start of the week is Monday).
thank
+5
Benss
source
to share
2 answers
Try it :-)
Dim FirstDayInWeek, LastDayInWeek As Variant
Dim dtmDate As Date
dtmDate = "15/04/2015"
Start date of the week:
FirstDayInWeek = dtmDate - Weekday(dtmDate, vbUseSystem) + 1 MsgBox FirstDayInWeek
End date of the week
LastDayInWeek = dtmDate - Weekday(dtmDate, vbUseSystem) + 7 MsgBox LastDayInWeek
+4
daniele3004
source
to share
Try this Formula: -
=A1-WEEKDAY(A1,2)+1
Where A1 contains your input date.
+1
Ankit bajpai
source
to share