John Colby
jcolby at colbyconsulting.com
Sat Oct 18 19:14:11 CDT 2003
All of which are ridiculous to me. Why give us the ability to define dates out to the year 3000, when there are very real applications for dates back to BC? John W. Colby www.colbyconsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Stuart McLachlan Sent: Saturday, October 18, 2003 8:08 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Number vs text data type On 18 Oct 2003 at 17:33, Henry Simpson wrote: > Christian: > > If one were using an fluctuating base 365/366 number system, that would be > close, but that is unnecessarily complicated. The integer portion is > usually a count of days before or after the date: > > ?format(cdate(0), "dd mm yyyy") > 30 12 1899 > Since Dates are really just doubles, you don't really even need the CDate() here, just Format(0,"dd mm yyyy"). > which is December 30, 1899. Negative numbers are days prior to that day. > > If you replace the 0 with a 2, you get January 1, 1900 and if you use 367, > you get the first day of the 20th century, January 1, 1901. There's > Microsoft logic shining as it often does. > That strikes me quite often when I'm doing date manipulation. I've tried to see the reasoning behind that start date. So far, I can't see it at all. Can anyone come with *any* logical reason? Especially when you consider that Excel uses a more logical scheme where Day 1 is "1 Jan 1900" Still in some ways Access is better than Excel which returns "O Jan 1900" for Day 0 and an error for negative numbers :-) -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support. _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com