Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!lll-lcc!pyramid!infmx!aland From: aland@infmx.UUCP (Dr. Scump) Newsgroups: comp.databases Subject: Re: Informix 4gl "construct" statement broken Summary: good point... the current release works how you want it Message-ID: <526@infmx.UUCP> Date: 15 Oct 88 02:04:31 GMT References: <471@pan.UUCP> <1214@cod.NOSC.MIL> <467@infmx.UUCP> <491@pan.UUCP> Organization: Informix Software Inc., Menlo Park, CA. Lines: 46 In article <491@pan.UUCP>, jw@pan.UUCP (Jamie Watson) writes: > In article <497@infmx.UUCP> aland@infmx.UUCP (Dr. Scump) writes: > >Jamie, if you are still having problems with it, make sure of the > >following: > > 3) if using dates in forms, make sure you have the correct FORMAT > > clause on the field attribute, e.g. > > f001 = person.birthdate, format = "dd.mm.yy"; > > otherwise, the standard date format ("mm/dd/yy") is assumed. > > Wait a minute, why is this necessary? I just created a tiny test form > and a 4gl program to go with it, and sure enough, if I add a format > specification to the form as you indicate, the construct statement > in the 4gl program works. I certainly don't see why it is necessary, > though; in fact, it looks to me like it defeats the purpose of the > DBDATE environment variable, because it is hard-coding the date format > into the form! > ... > jw Yeah, I agree with you... technically, the general default date format is "mm/dd/yyyy", but it does seem somewhat arbitrary that DBDATE does not automatically override this default in FORM4GL. If you look at page 3-32R, you will see these examples using the date Sept. 15 1986: Input Result no FORMAT attribute "09/15/86" ... ... FORMAT = "dd-mm-yy" "15-09-86" Soooo, the documentation is *technically* correct (no flames please :-]), but this functionality is not explained well at all. In my opinion, it should have been stated in a Note at least, especially since the environment variable appendix entry on DBDATE implies that DBDATE alone should take care of default date formatting. If it makes you feel any better, this was changed in the current release (1.10.03) so that DBDATE *does* override the general default in FORM4GL. Therefore, the FORMAT="dd.mm.yy" would not be necessary in the current release. (I also tested this is the current DOS release [1.10.06], and it works the same as UNIX 1.10.03, in case you use DOS.) -- Alan S. Denney | Informix Software, Inc. | {pyramid|uunet}!infmx!aland Disclaimer: These opinions are mine alone. If I am caught or killed, the secretary will disavow any knowledge of my actions. Santos' 4th Law: "Anything worth fighting for is worth fighting *dirty* for"