[AccessD] Re: DatePart Question

Charlotte Foust cfoust at infostatsystems.com
Mon Feb 2 13:17:29 CST 2004


I use code to create  them and to append to them, but I modify that code
to meet the particular needs of a client, and I don't bother with
holidays, since that has never been part of the specification.  If you
want a copy of the module that contains the routines I use, I'll be glad
to send it to you to play with if you email me.  I haven't looked at it
in about 4 years, so I make no guarantees. <g>

Charlotte Foust

-----Original Message-----
From: Gina Hoopes [mailto:hoopesg at hotmail.com] 
Sent: Monday, February 02, 2004 10:12 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Re: DatePart Question


Thanks to you and to Gustav for giving me more good ideas.  I guess your

question kind of goes back to my original one.  If it looks at the whole

date before giving me the "1" for the month, then I'll get Jan 05 data 
rather than Jan 04 data.  I guess the question is senseless since both
Joe 
and Gustav have given me good alternatives, but I may still have to plug

some fake data just to see what I get back.

I have been following the dates table discussion and I've got another 
(stupid) question.  Except for fiscal years and holiday schedule 
modifications, is this not the type of table that one of the people who
has 
already spent the time to create it could just put out for everyone to
use?  
I'm afraid I started following the discussion a bit late, so maybe I
missed 
something.  It's not that I mind a day spent creating something really 
useful, it just seems a bit like re-inventing the wheel.

Gina


From: "Robert L. Stewart" <rl_stewart at highstream.net>
To: accessd at databaseadvisors.com
CC: hoopesg at hotmail.com
Subject: Re: DatePart Question
Date: Fri, 30 Jan 2004 23:39:52 -0600

Gina,

What are you going to do when the year changes and you have data for 2 
January's in 2 years?  The year has to be part of what you us in the
query.  
Try using the date dimension table technique I have been talking about
and 
it will smooth things out for you and dates (well dates in the database 
anyway ;-))  ).

Robert

At 02:27 PM 1/30/2004 -0600, you wrote:
>From: Gina Hoopes <hoopesg at hotmail.com>
>To: AccessD at databaseadvisors.com <AccessD at databaseadvisors.com>
>Date: Friday, January 30, 2004 1:26 PM
>Subject: [AccessD] DatePart Question
>
>
>This may be a dumb question, but here goes.  I have a table full of 
>data that I need to query, and what I need returned is the data from 
>last month. If I query the Max on DatePart("m",PeriodEnd) on the data 
>that's there now, I get a 12 which is correct (from 12/31/03).  But, 
>next month we will have added January '04 data, so the latest data in 
>the PeriodEnd field will be 1/31/04, but when I query for just the 
>month, am I going to get a 1?  I guess I'm asking if the Max function 
>is still going to look at the whole date and return just the DatePart 
>of "m", or will 12 be considered alone, and therefore greater than 1?
>
>I'm always open to an easier method, if you've got any ideas.
>
>Thanks,
>Gina




Thanks,
Gina

_________________________________________________________________
Scope out the new MSN Plus Internet Software - optimizes dial-up to the
max! 
   http://join.msn.com/?pgmarket=en-us&page=byoa/plus&ST=1

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list