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

Acces 97-Week starts at Sunday

Status
Not open for further replies.

Jaderzaaaa

IS-IT--Management
May 7, 2002
25
0
0
BE
Hello,
I have a little query where i have a datepart function that extracts the weeknumber from a field. But here a week starts on Sunday.
Where i live a week starts on Monday.
Is there any way to state it in the query without diving into vba?
thanks
 
Please check the help files before coming here with the question. In this case, if you just type in the function and look at the intellisense that pops up on the screen, you'll see that there's a parameter for when the week starts right in the function.

Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
If u read my question u know that im not looking for a function.. i was talking about the QUERY parameters .. :)
I alrdy checked MS's helpfile but it didnt help me further so i posted here...
 
There is no way to set the first day of week in a query without using some type of function to accomplish that. The Regional Setting don't have a First Day of Week property so it's VBA or nothing.

Paul
 
SELECT tblAction.ActionID, tblAction.CompletionDate, DatePart("ww",[CompletionDate],3) AS WeekNo, DatePart("ww",[CompletionDate]) AS WeekNormal
FROM tblAction
WHERE (((tblAction.ActionID)<4000));

The two week fields in this query produce different results, because I'm starting the week on Tuesday in one of them. It's true that you can't use the constants, but you can use the integers there.

Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top