I am trying to use datepart to to set the first day of the week as Thursday. Problem is I have looked at the examples of the code and I can not seem to figure out what I need to type to make it work. I have 0 experience when it comes to VB coding so I normally try and find an example of what I want and simply copy and paste it but I have not been able to find an example. Can someone spell out the datepart function for me so I can try and make this work?
Using datepart to set the first day of the week
Collapse
X
-
-
The FirstDayOfWeek Arugument has relevance only for the w (Weekday) and ww (Week) Intervals. A couple of examples, with Output, based on the Current Date (3/16/2010) and Weekday Interval, are:
Look at the the Help File for complete details on its use.Code:? DatePart("w",#3/16/2010#,vbTuesday,vbFirstJan1) 1 ? DatePart("w",#3/16/2010#,vbWednesday,vbFirstJan1) 7 ? DatePart("w",#3/16/2010#,vbThursday,vbFirstJan1) 6 ? DatePart("w",#3/16/2010#,vbMonday,vbFirstJan1) 2
Comment