Results 1 to 3 of 3
  1. #1
    wongray is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2008
    Posts
    6

    How to display week of the year

    Hello,



    I need help. could someone tell me how to display the week of the year in the querry?

    Example: 01/01/2011 will display as Week 1, 12/28/2011 will display as Week 52

    Many Thanks
    Ray

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    I don't think there is a week() function in access. have you considered using datediff()?? You might be able to get it down to a science if you can use datediff() using a 'days' parameter and a floor function of somekind, like int(). maybe something like:
    Code:
    int(datediff("d", "1/1/" & datepart("yyyy", date()), YOUR DATE)/7)

  3. #3
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    192
    Try this in your query:
    Week#: DatePart("ww",[Your Date Field])
    Alex Motilal

Please reply to this thread with any new information or opinions.

Similar Threads

  1. week overview
    By FSCHAMP in forum Programming
    Replies: 3
    Last Post: 12-23-2010, 06:23 PM
  2. Finding last week
    By jgelpi16 in forum Queries
    Replies: 5
    Last Post: 09-21-2010, 02:32 PM
  3. How to display year season from date entry
    By Allaw212 in forum Access
    Replies: 3
    Last Post: 06-01-2010, 11:11 AM
  4. Retrieving Week of Year in a date range
    By Korvega in forum Queries
    Replies: 2
    Last Post: 05-27-2006, 06:29 AM
  5. Day of Week Totals
    By ddog171 in forum Queries
    Replies: 1
    Last Post: 03-18-2006, 07:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums