Solved

Break down date range into month identifiers in ACCES 2010

Posted on 2013-12-17
3
325 Views
Last Modified: 2013-12-22
I am getting tired and desperately need help.  I have  ultimately a report that will span 18 months, can start at any time during the year so, say if the user wants to start the 18-month span on April 15 2013, then Month1 is April, Month2 is May, up to the next 18 months. However, in the data source, for a project I could have to start with is a date range say, Start Date for FTE Assignment = May 20, 2013, End Date for FTE Assignment is September 20, 2014.  I need a way to assign May as the Month2 and each month thereafter the next consecutive month number.  I have a procedure that use the report start date to determine which months are to be considered as Month1, Month2, etc to Month18, but I need to take the data start and end dates, break it down into the months as assign each month to the correct Month Report number and am at a loss.  I thought I would start with a date diff to get the count of the months between May and the end Start date, but then got stuck.  I am trying to get staffing needs for various projects over the 18-month span and the projects all start/end on different dates, so need to determine staff needs for the months.

Hope that makes sense.

Sandra
0
Comment
Question by:ssmith94015
  • 2
3 Comments
 
LVL 13

Expert Comment

by:magarity
ID: 39725718
This kind of project is made a lot easier with a standalone date reference table.  Make a table with a sequence number for the primary key and then dates as days,  dates as text, a column for number in year, etc. Populate the table with years of dates and make sure they are in order so the sequence number is in order. Then you can use the sequence number to do the 18 month calculations, etc.
Sorry, I'm typing this on a phone so I can't go into much detail but hopefully you get the ideas.  Any questions I can write more tomorrow
0
 

Accepted Solution

by:
ssmith94015 earned 0 total points
ID: 39725757
Actually, that really does not get to the problem is dynamically assigning the month sequence to varying start months.  I appreciate the suggestion, but I tried that and still had the same problem.  Actually, I built  function that if I pass in the FTE start date and the start date of the report, it seems to return what I need.  However, am going to post another related question on this subject, again thank you.
0
 

Author Closing Comment

by:ssmith94015
ID: 39734481
Created function that actually did the needed processing.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question