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

Data by Week 1

Status
Not open for further replies.

Mike555

Technical User
Feb 21, 2003
1,200
US
I first posted this question in thread703-896393, but I now need to make this more robust.

I have table "tblOrders" with field "DateAdded". I have a query that runs from tblOrders and displays some data. I need to include in this query a new field named "FirstDayofWeek" that displays the first day of the week that corresponds with "DateAdded".

To use this week as an example, if a record has "DateAdded" = 08/09/04, then I need to have the "FirstDayofWeek" = 08/08/04 (Since 08/08/04 is the first day of the week for 08/09/04).

Can this be done? Thanks.

--
Mike

Why make it simple and efficient when it can be complex and wonderful?
 
Something like this ?
FirstDayofWeek = DateAdded + 1 - Format(DateAdded,"w",2)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks PHV!

--
Mike

Why make it simple and efficient when it can be complex and wonderful?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top