4GL Question
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Internationalization & Character Sets
I am working on a Year 2000 problem. I have many .per and many .4gl to work with. I am trying not to have to modify the 4gls if possible. The question is how can I force the user to enter a 4 digit year in a type date field, while also giving them the ability to enter or change the value to a NULL? All these forms are being accessed from 4gls and are not ISQL Perform screens run from the Perform menu. Database 7.2x -- 4GL 6.0
try using "picture dd/mm/yyyy" on the .per files. In article <36bf3377.8641702@client.se.news.psi.net>, boost_me@yahoo.com (Bob) wrote: > > I am working on a Year 2000 problem. I have many .per and many .4gl > to work with. I am trying not to have to modify the 4gls if possible. > > The question is how can I force the user to enter a 4 digit year in a > type date field, while also giving them the ability to enter or change > the value to a NULL? All these forms are being accessed from 4gls and > are not ISQL Perform screens run from the Perform menu. > > Database 7.2x -- 4GL 6.0 > -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
henriquelima@uol.com.br wrote in message <79t9t2$kl1$1@nnrp1.dejanews.com>... >try using "picture dd/mm/yyyy" on the .per files. > (hopefully) Clarifying the above. If you're refering to a date data type, either by referring to a database column of type date or a formonly variable of type date, the syntax is format = "mm/dd/yyyy" or whatever. This won't require actual 4-digit year input, but does show a four-digit year as the user exits the field. Thus a user can input 1/1/00, and as the cursor leaves the field it will change to 01/01/1900, or 01/01/2000, depending on the $DBCENTURY setting. Is this y2k compliant? Jonathan and I say yes, but other rules may be more specific. You could actually force 4-digit year input by changing the data type of the field to char, and use picture = "##/##/####", but now you have a lot of parsing and checking to make sure that a valid day, month, and year has been input. A lot more 4GL code changes required there. >In article <36bf3377.8641702@client.se.news.psi.net>, > boost_me@yahoo.com (Bob) wrote: >> >> I am working on a Year 2000 problem. I have many .per and many .4gl >> to work with. I am trying not to have to modify the 4gls if possible. >> >> The question is how can I force the user to enter a 4 digit year in a >> type date field, while also giving them the ability to enter or change >> the value to a NULL? All these forms are being accessed from 4gls and >> are not ISQL Perform screens run from the Perform menu. >> >> Database 7.2x -- 4GL 6.0 >> > >-----------== Posted via Deja News, The Discussion Network ==---------- >http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own