Gary Kjos
garykjos at gmail.com
Mon Jul 26 16:53:58 CDT 2010
Hi Debbie, You MIGHT want to have a look at this article that describes a lot of stuff about Access Date Fields http://support.microsoft.com/default.aspx?scid=kb;en-us;130514 This article describes date field in Access. They are a double precision numeric field with the data to the left of the decimals representing the number of days since the beginning and the decimal portion representing the fractional part of the day for the time. Day number ZERO in this scheme is December 30, 1899. Dates before this date are represented by Negative numbers and after are positive numbers. So the dateadd function and the simple math should both yield the same result as they are only adding a number of days which is then reformatted into whatever date format you have indicated after the math is done. Dateadd is a great function when you are doing math for other than days but for the example of adding days it would not seem to me to matter. I agree that the between says you should probably add 59 instead of 60 though. I'd make a test table and run some tests to be sure though as I always get messed up with math ;-) GK On Mon, Jul 26, 2010 at 2:15 PM, Debbie <delam at zyterra.com> wrote: > I have an existing app that gets date criteria for a report by adding > 60 to the date. Between me.datePicker and me.datePicker + 60. I am > being asked some very specific questions about when it counts from. My > unfderstanding is that this is a total of 61 days since between is > inclusive. Now I use dateadd() instead of the date + x method. Do > these potentially give different results, say if February or a leap > year is included? > > Debbie > > Sent from my iPhone > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- Gary Kjos garykjos at gmail.com