Results 1 to 2 of 2

Thread: Quarters (2003)

  1. #1
    New Lounger
    Join Date
    Sep 2006
    Thanked 0 Times in 0 Posts

    Quarters (2003)

    I''ve built a couple of queries to bring up items that were shipped/received during a specific quarter. Each time I run one of the queries, I define the beginning and ending dates of the quarter; but I was wondering if it was possible to pre-define quarters in a way that I could enter 1-08 (1st Q 2008, or something like that) and have Access know what I'm talking about without changing the source table. I'm trying to tie the queries together as subforms and it would be helpful to not have to enter all the dates each time. Thanks,

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 30 Times in 30 Posts

    Re: Quarters (2003)

    You can add a calculated column to each of the queries:
    Quarter: Format([DateField],"yyyyQq")
    where DateField is the relevant date field. For today's date, Quarter would be 2008Q1.

    You could use <code>Format([DateField],"qQyy")</code> instead (result: 1Q08), but the format above has the advantage that you can sort on it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts