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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Date Sort Problem 1

Status
Not open for further replies.

Olddogg1

IS-IT--Management
Aug 12, 2005
21
CA
Hi There,

I'm running a query that simply filters by month from a full date. (Month/Day/Year) I use the term: Like "1/*" for January.

When the Query comes up in table form I am trying to sort the records by DAY of the month not by the YEAR.

Can this be done?

Thank You Very Much For Your Help!
Jon
 
Make a new field for the day:

DayofMonth: Day([DateField])

Then, in the criteria box, put in the number of the day you want to filter for. If you don't want to see the day number you can un-check the "Show" box.
 
In the SQL view:
SELECT ...
FROM ...
WHERE Month([yourDateField])=1
ORDER BY Day([yourDateField])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yeah, my bad, I misread the question. Ignore my answer, both of these ones will work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top