Results 1 to 6 of 6
  1. #1
    survivo01 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    71

    Cross tab query columns sort date by month then year


    Example: columns sort date jan 2010, Jan 2011, Jan 2012

    I want Jan 2010, February 2010, March 2010

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    You will have to calculate a field that formats the date as YYYYMM and use that field as Column Header.
    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
    survivo01 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    71
    I changed the format but it changed the date to Microsoft numerical date versus 2012Jun

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Show the SQL statement of attempted query.

    Format([fieldname],"yyyymm")
    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.

  5. #5
    survivo01 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    71
    Expr3: Format([Datepaid],"yyyymm")

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Format results in a string. I have used this before in CROSSTAB and never had the issue you describe.

    That is not the complete SQL statement.
    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: 5
    Last Post: 08-26-2014, 06:07 AM
  2. Replies: 4
    Last Post: 05-26-2013, 03:28 PM
  3. Year to DATE by Month
    By lugnutmonkey in forum Queries
    Replies: 1
    Last Post: 01-18-2013, 05:37 PM
  4. month year date
    By slimjen in forum Database Design
    Replies: 6
    Last Post: 04-17-2012, 01:02 PM
  5. Sort by date and year
    By Douglasrac in forum Queries
    Replies: 13
    Last Post: 04-07-2011, 10:02 AM

Tags for this Thread

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