[AccessD] Number vs text data type

Henry Simpson hsimpson88 at hotmail.com
Sat Oct 18 20:24:37 CDT 2003


Agreed.  I can see no justifiable reason for the arbitrary cut off of 
negative date values below:

?cdate(-657434)

How did they choose that magic number when the range of potential numbers 
for a double range down to over 300 digits and not just part way through 6.

Those who face the need to catalog Egyptian artifacts would probably resort 
to string representations of dates even though they might want to estimate 
life spans of pharoahs and calculate contemparaniety between the two.  
Still, there is no reason you can't still store a numeric representation and 
write your own custom FormatDate function though that would be a real 
nuisance if you needed to write the algorithms to determine which day of the 
week a particular date in that range falls.

Hen

>From: "John Colby" <jcolby at colbyconsulting.com>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: "Access Developers discussion and problem 
>solving"<accessd at databaseadvisors.com>
>Subject: RE: [AccessD] Number vs text data type
>Date: Sat, 18 Oct 2003 20:14:11 -0400
>
>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
>
>
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail



More information about the AccessD mailing list