Calendar vs Accounting Dates (1 Viewer)

BHill

New member
Local time
Today, 03:24
Joined
Jul 31, 2001
Messages
8
I new at this, trying to keep writing code to a minimum.

I need to be able to generate queries and reports based on an accounting month (ie the month ends 3 business days before the last business day, assuming no holidays) in addition to queries/reports based on calendar month.

I created a dialogue box where the user can choose from a list of start and end "months" eg 1/01 to 5/01, and then click "Calendar" or "accounting". If accounting was chosen the report starts 12/26/00 and ends 5/28/01, inclusive.

Using format(date,MMM) in column grouping headings works fine in cross-tab queries with for the calendar report along with Jan, Feb etc in the Column headings.
I don't know what to do for the accounting months. Spent 25 hours on this already.

Is there a good (easy) way to have the MMM refer to a diferent set of days (calendar month)? Should I define a variable for each column heading?
Each year the months differ so I don't want to hard code anything. I'd love to have one set of reports, not 2.
I'm lost. Any ideas and/or directing me to samples would be terrific.
thanks
Brian
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 22:24
Joined
Feb 19, 2002
Messages
43,213
Somewhere in the list of articles below is the solution to your problem. If you can't figure out how to write what you need from these references, the knowledge base has more.

Q97757 ACC: How to Determine Number of Working Days Between Two Dates http://support.microsoft.com/support/kb/articles/Q97/7/57.ASP?LN=EN-US&SD=gn&FR=0&qry=calculate%20business%20days&rnk=6&src=DHCS_MSPSS_gn_SRCH&SPR=ACC97

Q88657 ACC: Functions for Calculating and Displaying Date/Time Values http://support.microsoft.com/support/kb/articles/Q88/6/57.ASP?LN=EN-US&SD=gn&FR=0&qry=calculate%20business%20days&rnk=19&src=DHCS_MSPSS_gn_SRCH&SPR=ACC97

Q130514ACC: Storing, Calculating, and Comparing Date/Time Data http://support.microsoft.com/support/kb/articles/Q130/5/14.ASP

Q149127 ACC: How to Determine If a Date Falls on a Weekend or Holiday http://support.microsoft.com/support/kb/articles/Q149/1/27.ASP?LN=EN-US&SD=gn&FR=0&qry=calculate%20business%20days&rnk=20&src=DHCS_MSPSS_gn_SRCH&SPR=ACC97

Q115489 ACC: DateAdd() "w" Interval Does Not Work as Expected http://support.microsoft.com/support/kb/articles/Q115/4/89.ASP?LN=EN-US&SD=gn&FR=0&qry=weekday&rnk=2&src=DHCS_MSPSS_gn_SRCH&SPR=ACC97

Q132101 ACC: How to Get the Fiscal Year/Month of a Particular Date http://support.microsoft.com/support/kb/articles/Q132/1/01.ASP?LN=EN-US&SD=gn&FR=0&qry=working%20day&rnk=3&src=DHCS_MSPSS_gn_SRCH&SPR=ACC97
 

BHill

New member
Local time
Today, 03:24
Joined
Jul 31, 2001
Messages
8
Pat,
many thanks. Between these articles I'm sure I'll be able to get a solution.
Brian
 

Users who are viewing this thread

Top Bottom