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

Querying certain days from a date 2

Status
Not open for further replies.

techkenny1

Technical User
Jan 23, 2009
182
AU
Hi all,
On a Continous form I have a date field. I want to know what to put on the criteria line of a query so that I can pull out days, Monday, Tuseday etc.
Many thanks,

kp
 
You may use Format([Date field],"dddd")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
How are ya techkenny1

Ad the following custom field to the query to view the day (shortform Mon-Tue-Wed ...):
Code:
[blue]WkDy:Format([Date field],"ddd")[/blue]
To filter using criteria:
Code:
[blue]Weekday([[b]YourDateFieldname[/b]])=[purple][b]Const[/b][/purple])[/blue]
Where [purple]Const[/purple] = 1 for Sunday, 2 for Monday ..., 7 for Saturday.

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top