MUSEUM-L Archives

Museum discussion list

MUSEUM-L@HOME.EASE.LSOFT.COM

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Museum discussion list <[log in to unmask]>
Subject:
From:
Charles Karukstis <[log in to unmask]>
Date:
Wed, 6 Sep 1995 22:22:33 -0400
Reply-To:
Museum discussion list <[log in to unmask]>
Parts/Attachments:
text/plain (33 lines)
Excuse me for being dense, but after the initial question and
many subsequent replies, has anyone mentioned what kind of
database we're discussing?  Depending on what type of DB you're
using, the range of solutions can be quite different - maybe an
external .DLL, maybe an internal function, whatever.  I guess it
would help to know as well if the date field in question is used
as an index (or is a key field).

In the past, I have provided flexible formatting to date fields
through two main approaches: a generic date field (mm/dd/yyyy)
with a second field (a single alphanumeric or integer is fine)
to indicate the date format, i.e. 0=use month, day and year,
1=use month and year only, and so on.  Retrieval of this date
field is usually accomplished through a function call with the
date format indicated as a parameter.

The other approach has been to store dates (the highest
frequency being daily) as a Julian date.  Then, depending upon
the level of granularity required, the date is broken down with
a MOD function call (i.e. an exact day would involve breaking
the number down to a remainder of zero).  I would probably avoid
storing dates as any other type of integer (like 090695) like
the plague.

Of course, either of these approaches could be easily packaged
as a .DLL in case two or more applications needed to access
these date fields.  But I really don't feel comfortable going
into more detail until I know what type of DB we're discussing.
 Hope this helps.

Charlie Karukstis
[log in to unmask]

ATOM RSS1 RSS2