=DateSerial(Year(Date()), Month(Date()), 1)
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
=IIf(WeekDay(DateSerial(Year(Date()), Month(Date()), 1)) = 1,
DateSerial(Year(Date()), Month(Date()), 1), DateSerial(Year(Date()),
Month(Date()), 1) - WeekDay(DateSerial(Year(Date()), Month(Date()), 1)) + 8)
--
Wayne Morgan
MS Access MVP
"Parintas Themis STE Kardias" <ste...@otenet.gr> wrote in message
news:ddhsmu$siv$1...@usenet.otenet.gr...
DOH! sorry, Had a brain fart there. This is obviously incorrect.
Public Function DateForFixedDayOfMonthYear(Day_Year As Integer, _
Day_Month As Integer, Day_Day As Integer, Day_WeekNum As Integer) As
Date
' Day_Year is the actual year for the desired date
' Day_Month is the actual month for the desired date
' Day_Day is the number of the weekday (1 = Sunday, etc. to 7 = Saturday)
' Day_WeekNum is the ordinal value for the desired date (e.g., 1 = first, 2
= second)
'
' So, if you want the 2nd Wednesday of May 2005:
' MyDate = DateForFixedDayOfMonthYear(2005, 5, 4, 2)
DateForFixedDayOfMonthYear = DateSerial(Day_Year, Day_Month, _
8 - DatePart("w", DateSerial(Day_Year, Day_Month, 1), _
1 + Day_Day Mod 7) + (Day_WeekNum - 1) * 7)
End Function
--
Ken Snell
<MS ACCESS MVP>
"Parintas Themis STE Kardias" <ste...@otenet.gr> wrote in message
news:ddhsmu$siv$1...@usenet.otenet.gr...
I might as well throw mine in:
Public Function NthXDay(N As Integer, d As Integer, dtD As Date) As
Integer
NthXDay = (7 - WeekDay(DateSerial(Year(dtD), Month(dtD), 1)) + d) Mod 7
+ 1 + (N - 1) * 7
End Function
Usage:
To get the day of the second Saturday in September 2005:
NthXDay(2, vbSaturday, #9/1/05#)
10
James A. Fortune