Re: Counting the Dates
- From: "Steve Gerrard" <mynamehere@xxxxxxxxxxx>
- Date: Sun, 27 Jan 2008 12:14:02 -0800
Webbiz wrote:
In other words, if I have 10 years of data and my data file starts
with March 3rd 1997, I start by placing the value for March 3rd in an
array element, then the 4th, 5th, etc. When I get back to March 3rd
of the next year, this is added to the first March 3rd value and
stored in the same element number of the array.
I wonder what you are up to. It occurs to me that summing March 3rd data
over 10 years may not mean a lot, if it is business related data. Is
this about stock prices, like your earlier project? Some years, March
3rd will be a Sunday. Holidays are often moved to the nearest Monday, a
different date year to year.
If you are after what I think you are after, it might make more sense to
look at week number and day of week. I would think data on the 10th
Monday, 10th Tuesday, and 10th Wednesday of the year might be more
meaningful, say, than data for the 3rd of March, 4th of March, and 5th
of March.
The DatePart function can return week number, using interval "ww". It
has some options on which week to count as the first week, depending on
where Jan 1 falls. Using default settings, Dec 31 2000 comes back as
week #54, which I assume is the highest it can go. Then you can use "w"
to get the weekday as a number, or use the WeekDay() function.
A 54 x 7 two dimensional array might work out nicely, similar to what
Robert M suggested using months and dates.
.
- Follow-Ups:
- Re: Counting the Dates
- From: Webbiz
- Re: Counting the Dates
- References:
- Counting the Dates
- From: Webbiz
- Counting the Dates
- Prev by Date: Re: Life of VB6?
- Next by Date: Re: Shared Access DB is Locked in Exclusive Mode
- Previous by thread: Re: Counting the Dates
- Next by thread: Re: Counting the Dates
- Index(es):
Relevant Pages
|
Loading