W WebAtl Guest Nov 15, 2002 #1 Can anyone tell me how to build a "where" clause that will only pull back records for the current month? I would appreciate it if anyone could help me out.
Can anyone tell me how to build a "where" clause that will only pull back records for the current month? I would appreciate it if anyone could help me out.
pdx_man Just trying to help Local time Today, 10:25 Joined Jan 23, 2001 Messages 1,347 Nov 15, 2002 #2 Create a new column in the query grid: TheMonth: Format([YourDateField],"mmyy") In the same column's Criteria row, put: Format(Date(),"mmyy")
Create a new column in the query grid: TheMonth: Format([YourDateField],"mmyy") In the same column's Criteria row, put: Format(Date(),"mmyy")
W WebAtl Guest Nov 15, 2002 #3 I didn't really understand that. I don't have a "date" column...I have a month column and I need to read the server's current month and pull back data for that month only. is there a way to do that?
I didn't really understand that. I don't have a "date" column...I have a month column and I need to read the server's current month and pull back data for that month only. is there a way to do that?
pdx_man Just trying to help Local time Today, 10:25 Joined Jan 23, 2001 Messages 1,347 Nov 15, 2002 #4 Well, use the Format(Date(),"mmyy") Statement and change the "mmyy" part to match what you have in your month field. So, if you are storing Jan, Feb, Mar ... then you would use: Format(Date(),"mmm") If it is January, February, March ... then Format(Date(),"mmmm") These statements would be in the Criteria row in your query. FYI - Date() returns the system date.
Well, use the Format(Date(),"mmyy") Statement and change the "mmyy" part to match what you have in your month field. So, if you are storing Jan, Feb, Mar ... then you would use: Format(Date(),"mmm") If it is January, February, March ... then Format(Date(),"mmmm") These statements would be in the Criteria row in your query. FYI - Date() returns the system date.