WeekVal ->First day of week

GUIDO22

Registered User.
Local time
Today, 22:24
Joined
Nov 2, 2003
Messages
515
Hi
Having a mental block this morning....!

Given a specific week no. for the current year... I need to return the first date of that week....
For example : week4 of this year (returns) 19/1/2015

Thanks
G
 
use the weekday function to return the day of the week for a given day, then subtract as required to get to Monday
 
Thanks, I have done it this way...

theDate = DateSerial(!YearVal, 1, 1)
FirstDayInWeek = theDate - Weekday(theDate, vbUseSystemDayOfWeek) + 1
newDate = DateAdd("ww", (!WeekVal - 1), FirstDayInWeek)

Create the first day of the year, then calculate the actual first day of that week, then add 'x' number of weeks to that date....
 

Users who are viewing this thread

Back
Top Bottom