Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pull out only perticular months data

Status
Not open for further replies.

billquga

Technical User
Aug 23, 2001
19
US
Hello All! I have a table where shipment tracking information is stored. Some of that information is "MONTH SHIPPED" "YEAR SHIPPED" as well as the "ACTUAL SHIP DATE". Right now i have a query that looks for the particular "MONTH SHIPPED" to give me a particulars month of data. I can also do this with the year. Is there any way I could eliminate the fields "MONTH SHIPPED" "YEAR SHIPPED" and pull the data only based on the actual ship date? The actual ship date is in short form format, but it does include the month and the year. Can i have my query look at the actual ship date and when i run it ask me what month i want to see? or what year i want to see? or even what quarter i want to see? Any help would be appreciated!
 
I'm not too sure about the "By quarter" because I am not all that familiar with Access but you can certainly run queries by month or by year by doing something like the following:

To get last months data:

SELECT * from MyTable WHERE Month([Actual Ship Date]) = Month(date)-1

Something similar will work for the year (just substitute "Month" with "Year") Mise Le Meas,

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top