>I have a problem with dates in an ABF application using Ingres 6.4/03 on
>There are four fields defined as follows:-
>1-3 :- ints containing day,month,year (e.g. 13,7,1995).
>4 :- An Ingres date field.
>Does anyone know if there is a function that can take the three seperate
>integers and convert them into the standard Ingres date format
>(e.g. 13-jul-1995) or is there some other way of doing it like a 3gl 'C'
>routine for instance.
How the date function interprets its argument depends on how you've got
II_DATE_FORMAT set; from memory any setting does not stop a date with
hyphens and a numeric month being interpreted as an American date. If
you know how II_DATE_FORMAT will be set you may prefer to replace (or
remove) the hyphens with the punctuation according to your setting, and
adjust the expression to put the components in the right order.
The settings available for II_DATE_FORMAT have always annoyed me, because
I can't set it to something that I regard as friendly to my users.
Outside the U.S. we want all dates on input to be interpreted as day,
month, year, (or perhaps year, month, day) *regardless* of the
punctuation the user has supplied. If it's set to MULTINATIONAL, for
example, and the user types 020495, they get the fourth of February, an
*idiot* American date (from a non-american user's perspective). I'd like
a setting that always has the month in the middle. Users want often
dates to be displayed in the default 03-Feb-1901 format, but to enter
them with the minimum number of keystrokes, 30201 for this example. We
generally settle for the GERMAN setting at non-VMS sites, because it
accepts 30201. The output is ugly in ISQL or QBF without a form but in
reports or ABF we set a template to get the nice output. However, get a
temp in to do some data entry, and lots of dates in the first 12 days of
a month will be entered with day and month transposed, because they typed
them with a slash.
Perhaps someone knows a better way, or there's some new settings I don't
know about. Of course, the above applies to Ingres clients only.
Auckland, New Zealand, phone (64) (9) 575 4621