Re: Standards question on edited fields

From: Judson McClendon (judmc_at_sunvaley0.com)
Date: 01/17/04


Date: Sat, 17 Jan 2004 17:18:40 GMT


"LX-i" <lxi0007@netscape.net> wrote:
> Judson McClendon wrote:
> > "LX-i" <lxi0007@netscape.net> wrote:
> >
> >>We have a field that is 9 characters - a 2-digit day, a 3-character
> >>month, and a 4-digit year. It's defined as follows...
> >>
> >>01 My-Date.
> >> 03 My-Day Pic 9(02).
> >> 03 My-Month Pic X(03).
> >> 03 My-Year Pic 9(04).
> >
> >
> > Why would you store a date in such a way?
>
> Who said I was storing it?
>
> > Dates in that format would
> > not sort correctly, and it seems you would not present such a format to
> > a human directly without editing, as your question demonstrates. I can't
> > see a reason for storing a date in such a format, because it would need
> > to be modified for either internal computer use or external human use,
> > making it useless in its current form. Is there a valid reason for this, or
> > is it just sloppy design? :-)
>
> I can't think of a military-format date in our database. However, being
> in the military, we have many requirements to display dates this way
> (today would be "16 Jan 04" most places, "16 Jan 2004" in a few). We
> either display the current date, or convert a data out of the database,
> which is usually stored in YYYY-MM-DD (relational) or YYYYDDD (DMS).
>
> So, it's not a sloppy design at all - and there is a valid reason.

I believe you, and having spent four years programming at command
level for the Air Force myself, I understand the requirement for such
display and print formats. I'm just curious what your specific reason
is for having a date that is (currently) stored inside the computer in
that form? I didn't say 'permanent storage'. :-)

Perhaps it's changed a lot in the three decades since I was in the USAF,
but I saw lots of crummy design. Lots of good design too, of course. :-)

-- 
Judson McClendon      judmc@sunvaley0.com (remove zero)
Sun Valley Systems     http://sunvaley.com
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."


Relevant Pages

  • ZPack update
    ... of note, a few additions have been made to the format, in particular: ... building an indexing structure and storing it to disk may make sense. ... index structure at load time, which may make the most sense for directories ... nature of the format (most implementations of b-trees I have seen have been ...
    (comp.compression)
  • Re: 2D height map to 3D model?
    ... (you're storing 12 doubles for almost every data-point). ... If you have a format that allows for triangle/quadrilateral strips, ... can make the rendering far more efficient using them. ...
    (comp.lang.python)
  • Re: Increment number based on list box
    ... I say 'number' because the format you're using is not numerical. ... So what you have to be doing is storing the number and then formating it ... You can have a table to store just the one value and keep incrementing it. ... Is there a macro that can accomplish this ...
    (microsoft.public.access.forms)
  • Re: Standards question on edited fields
    ... Who said I was storing it? ... I can't think of a military-format date in our database. ... either display the current date, or convert a data out of the database, ... it's not a sloppy design at all - and there is a valid reason. ...
    (comp.lang.cobol)
  • Re: Basic Date question
    ... Leaving it uninitialized is ... >You might also considering storing date in the numerical date format. ... I thought about that but we're going to use Crystal Reports and SQL ... Reporting Services and those aren't going to like that format. ...
    (microsoft.public.dotnet.languages.vb)