Results 1 to 4 of 4
  1. #1
    Bre2004 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    2

    Date Help

    I need to create a field that takes my transaction date and turns it into the correct quarter. Our first Quarter starts October 1st. So if the transaction date was 10/22/2014, I would want my new field to show quarter 1. Then if we had a transaction for January 22, it would then show Quarter 2.



    Thanks in advance for your help.

  2. #2
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    This is one way to do it.

    Create a table "QUARTERLOOKUP" with Field "STARTDATE", "ENDDATE", "QUARTER".
    STARTDATE ENDDATE QUARTER
    10/1/2014 12/31/2014 1
    1/1/2015 3/31/2014 2
    4/1/2015 6/30/2015 3
    7/1/2015 9/30/2015 4
    10/1/2015 12/31/2015 1

    Create a query and look up the "QUARTERLOOKUP" table and find your quarter.

    SELECT QUARTER FROM QUARTERLOOKUP WHERE [TransactionDate] BETWEEN [START DATE] AND [END DATE];

  3. #3
    Bre2004 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    2
    It tells me I have a Data type mismatch in criteria expression. Here is how I have it written.

    "where [Tran_Date]between[startdate]and[enddate]"

  4. #4
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    What is "STARTDATE" and "ENDDATE"? DATE/TIME???

    Did it ask you to fill in the "Tran_Date"? or did you get "Tran_Date" from a form or table or ...?

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

Similar Threads

  1. Replies: 3
    Last Post: 12-02-2014, 07:58 PM
  2. Replies: 11
    Last Post: 07-20-2014, 06:22 PM
  3. Replies: 2
    Last Post: 07-09-2013, 06:31 PM
  4. Replies: 1
    Last Post: 02-12-2013, 03:48 AM
  5. Replies: 3
    Last Post: 08-21-2012, 03:05 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