Re: Date Fields Entered: MM/DD/YY Stored: MM/DD/YYYY
Posted in 1994
Topics: General Discussion
johnl@informix.com (Jonathan Leffler) writes:
>>Date: Thu, 27 Jan 94 15:31:50 KST (1531Z)
>>From: EAPC-AMO2@korea-emh7.army.mil
>>Subject: Date Fields Entered: MM/DD/YY Stored: MM/DD/YYYY
>>
>>We are using Informix On-line 4.10 on an Everex 486e running Interactive
>>Unix 3.2. We have a bunch of forms designed for date input of the
>>MM/DD/YY format. However, the data is stored in the MM/DD/YYYY format.
>>I was reading in the manual (a sin, I know; please forgive me)<G> that a date
>>entered as a two digit year will, by default, have 19 as the century.
>>Is this true?
>Yes.
>>Is it configurable?
>No.
YES You should be able to!
set DBDATE MDY2will use mm/dd/yy as the date
set DBDATE MDY4would make it back to mm/dd/yyyy
please refence page b-6 of the informix sql user guide version 4.00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% KARL R. SCHIMMEL %
% ___ ___ ________ _______ _______ %
% / \\ / /\\ / __ /\\ / _____/\\ / _____/\\ %
% / /\\ \\ / / / / /_/ / / / /\\____\\/ / /\\____\\/ %
% / / /\\ \\ / / / / __ / / / / / /____ /\\ %
% / / / \\ \\/ / / / / / / / / /_/___ _\\___/ / / %
% /__/ / \\___/ / /__/ /__/ / /_______/\\ /______/ / %
% \\___\\ \\__\\/ \\__\\/\\__\\/ \\_______\\/ \\______\\/ %
% %
% NORTH AMERICAN CUSTOMER SUPPORT %
% TECHNICAL SUPPORT ENGINEER %
% %
% LENEXA, (800) 274-8184 %
% schimmel@informix.com - email %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>General suggestion: use 4 digits for the years of all dates -- the turn of
>the century is nigh (with greater probability than the Apocalypse recently
>advertised here;-). Sorting out your forms and reports now will save you
>time later, and will allow you to run round chasing all the other
>applications over which you don't have control and which have forgotten
>about the turn of the century...
>General question... If Informix was going to make it configurable, how
>should the configuration be handled? Have some date, eg 49, where a
>2-digit year less than that is 20xx, and later than that is still 19xx?
>Set by environment variable? Or some other technique?
>>SGT Ray Storer
>>US Army
>>Seoul, S. Korea
>>eapc-amo2@korea-emh7.army.mil
>Yours succinctly,
>Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>