Re: How do YOU store months??

From: Michael Sallwasser <msallwas_at_world.nad.northrop.com>
Date: Tue, 14 Jun 1994 16:22:28 GMT
Message-ID: <CrEAtH.62o_at_gremlin.nrtc.northrop.com>


In article <2t2ecf$fpr_at_uuneo.neosoft.com> chadb_at_NeoSoft.com writes:
>I'm trying to create a table that is dated by month and year only. How
>is this commonly done??

In our shop, not for any particularly good reason, we store year and month as two separate numeric fields. Although I have not tried it, I would have liked to at least explore storing the value as a single number and using views to represent the column as three columns: period, year, month.

> All I can think of is:
>-use data and always store as YYMM01
>-use a number with YYMM
>-use a char(4) with YYMM
>

Of the three options you have, only the first two appear viable with the following important point for the second option.

IMPORTANT POINT: Do not store year as YY, rather store **ALL 4 DIGITS**.

-- 
============================================================================
Michael Sallwasser  | Down one path is utter dispair and hopelessness. Down 
Northrop Grumman    | the other is total destruction. Let us choose wisely.
============================================================================
Received on Tue Jun 14 1994 - 18:22:28 CEST

Original text of this message