Results 1 to 4 of 4
  1. #1
    som_35711 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2015
    Posts
    2

    1st week of month as Week 1

    I have a query which displays the date as week (image attached)
    But is there any way the 1st week of every month shows as week 1.


    SQL of query is below.

    TRANSFORM Sum(Table1.[Total]) AS SumOfTotal
    SELECT Table1.[User], Sum(Table1.[Total]) AS Total
    FROM Table1
    GROUP BY Table1.[User]
    PIVOT Format([Date],'"Week" ww of mmm yyyy');
    Click image for larger version. 

Name:	Access.png 
Views:	5 
Size:	22.5 KB 
ID:	19543

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    Did you try single w?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    som_35711 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2015
    Posts
    2
    Single w gives weird results

    Click image for larger version. 

Name:	acces.png 
Views:	4 
Size:	7.4 KB 
ID:	19564

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962

    Monthly Week Number

    Sorry, my memory failed. Single "w" is day of week number. Turns out there is no intrinsic function for monthly week number. Requires custom function.

    Here is an example:

    http://www.vbaexpress.com/kb/getarticle.php?kb_id=1085
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-28-2015, 12:19 PM
  2. Replies: 1
    Last Post: 11-01-2013, 11:53 AM
  3. Replies: 3
    Last Post: 09-19-2013, 10:18 AM
  4. Start a report on week 40 of a week count
    By aspitalnick in forum Reports
    Replies: 8
    Last Post: 11-28-2012, 04:53 PM
  5. First week or business day of the month
    By Dutch1956 in forum Programming
    Replies: 12
    Last Post: 09-18-2011, 08:39 AM

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