Results 1 to 5 of 5
  1. #1
    mabuhay87 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    8

    Total Weeks and Concatenate Period Dates

    Original Data:

    EmpNo---------Pay Period
    1----------------11/11/2013
    1----------------11/25/2013
    1----------------12/9/2013
    1----------------12/23/2013
    1----------------1/6/2014
    1----------------1/23/2014
    1----------------2/10/2014



    First Query Output: Count Total Weeks Each Pay Period

    EmpNo----------Pay Period------------Total Weeks
    1----------------11/11/2013---------------2
    1----------------11/25/2013---------------2
    1----------------12/9/2013----------------2
    1----------------12/23/2013---------------2
    1----------------1/6/2014------------------2
    1----------------1/23/2014-----------------2
    1----------------2/10/2014-----------------2

    Second Query Output: Concatenate Pay Periods by Months, or by Year, or by showing all records.
    By months:
    EmpNo------------------Period
    1----------------11/11/2013 - 11/25/2013
    1----------------12/9/2013 - 12/23/2013
    1----------------1/6/2014 - 1/23/2014
    1----------------2/10/2014 -


    By year:
    EmpNo------------------Period
    1----------------11/11/2013 - 12/23/2013
    1----------------1/6/2014 - 2/10/2014


    By all records:
    EmpNo------------------Period
    1----------------11/11/2013 - 2/10/2014

    Please help. Thank you.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Not sure what you want. Do you just want to show the begin and end date in a single field? Or do you want to summarize wages by some specified range?

    Looks like the pay periods are always 2 weeks.
    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
    mabuhay87 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    8
    1) show the begin and end date in a single field. How to query that?
    2) how to query 2 weeks of a pay period?

    Thank you.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Is PayPeriod the end date? If the pay period is always 2 weeks, calculate the start or end date. 2 weeks is 14 days. Add or subtract 13. The 11th and 25th can't be in the same period, that would be 15 days.

    SELECT PayPeriod - 13 & "-" & PayPeriod AS PP FROM table;

    or


    SELECT PayPeriod & "-" & PayPeriod + 13 AS PP FROM table;

    To filter for a specific period:

    SELECT * FROM table WHERE PayPeriod BETWEEN [enter start date] AND [enter start date] + 13;

    [enter start date] can be input by reference to textbox on a form.
    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
    mabuhay87 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    8
    Thank you June7.

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

Similar Threads

  1. The period og days between two dates
    By roar58 in forum Queries
    Replies: 5
    Last Post: 10-06-2013, 11:58 AM
  2. Search by weeks and or months (dates)
    By sdc1234 in forum Access
    Replies: 3
    Last Post: 08-30-2013, 10:57 AM
  3. Weeks Conversion
    By jake32008 in forum Access
    Replies: 3
    Last Post: 10-26-2012, 01:28 PM
  4. Help with most recent 2 weeks query.
    By tplee in forum Queries
    Replies: 7
    Last Post: 11-30-2011, 08:05 PM
  5. Replies: 3
    Last Post: 11-22-2011, 11:06 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