B
Ben
I currently have a Query that converts [Meeting Week], [Meeting Day] and
[Meeting Month] from my Table into the proper date for the current year in
[Meeting Date] in my Query.
Meaning, I can have [1] (first), [2] (Monday) and [1] (in January) in my
Table and [Meeting Date] in my Query will tell me that it is "January 5,
2004."
However, I need to be able to modify my code to either make the appropriate
calculations one year previous or one year in the future depending on the
instance. While I know there are other ways to accomplish this conversion, I
am married to this method so I really need a way to modify this code to find
the given date for a given day of the week in a given month one year in the
future and one year in the past.
My current code reads as follows:
SELECT Format(DateSerial(Year(Date()),[Meeting
Month],8-DatePart("w",DateSerial(Year(Date()),[Meeting Month],1),1+[Meeting
Week Day] Mod 7)+([Meeting Week Num]-1)*7),"mmmm d"", ""yyyy") AS [Meeting
Date], *
FROM [Corporate List]
WHERE ((([Corporate List].[Annual Date]) Like "*January*") AND (([Corporate
List].[Annual Letter])=True) AND (([Corporate List].[Static Date]) Is
Null));
What needs to be added, and where?
Thank you in advance.
[Meeting Month] from my Table into the proper date for the current year in
[Meeting Date] in my Query.
Meaning, I can have [1] (first), [2] (Monday) and [1] (in January) in my
Table and [Meeting Date] in my Query will tell me that it is "January 5,
2004."
However, I need to be able to modify my code to either make the appropriate
calculations one year previous or one year in the future depending on the
instance. While I know there are other ways to accomplish this conversion, I
am married to this method so I really need a way to modify this code to find
the given date for a given day of the week in a given month one year in the
future and one year in the past.
My current code reads as follows:
SELECT Format(DateSerial(Year(Date()),[Meeting
Month],8-DatePart("w",DateSerial(Year(Date()),[Meeting Month],1),1+[Meeting
Week Day] Mod 7)+([Meeting Week Num]-1)*7),"mmmm d"", ""yyyy") AS [Meeting
Date], *
FROM [Corporate List]
WHERE ((([Corporate List].[Annual Date]) Like "*January*") AND (([Corporate
List].[Annual Letter])=True) AND (([Corporate List].[Static Date]) Is
Null));
What needs to be added, and where?
Thank you in advance.