|
Just FYI why I asked.
We offer an software package that allows RPG programmers writing
Web-Applications without knowing anything about HTML, Javascript etc.
The RPG programmer only defines what field/column from which
table/viewl/physical file has to be displayed additionally he can add
several edit keywords.
Based on the defined files and columns we generate SQL commands on the fly
execute them display the result.
The data is automatically converted and returned in the expected format into
the appropriate RPG fields.
As for date fields currently we do not only support date fields we also can
handle numeric fields like dates based on a keyword. Currently we support
numeric dates format in the formats YYYYMMDD, CYYMMDD, YYMMDD, YYYYDDD,
YYDD. These numeric values can be relatively easy converted and used for
sorting etc.
But now my manager in his own old application a numeric date field in an
European format.
Now he insists that it is absolutely necessary that we also support numeric
dates in the European (DDMMYYYY) or USA (MMDDYYYY) or DDMMYY or MMDDYY.
Because the year is not at the beginning (and because SQL itself does not
support numeric date fields), we need to do a lot of complex programming,
because we need to convert those date fields forward and backward, for being
able to sort them correctly etc. .
IMHO numeric dates might be widely used, but I assume in a format where the
year is at the first position. Otherwise those companies have their own
logical files that split those dates into separate columns.
My proposal was, adding views to the original files that convert those
strange numeric dates into real dates. The appropriate UDFs are available in
the software package and SQL-Views can be easily managed.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Paul
Nelson
Gesendet: Wednesday, 28.1 2015 14:14
An: 'Midrange Systems Technical Discussion'
Betreff: RE: Physical Files with numeric dates?
I know of one old package that stores the dates as a 5 digit number. The
original programmer called them "century dates". Day number one of the
century was 00001, and the last day of the century is 36525. The package was
sold internationally, so there was no worry about where the machine was
installed.
His algorithm looked at something inside the OS and figured out which
country the machine was located, how the dates were to be presented to the
end user, and to interpret what the user had entered as a date. Internally,
the date was just a number.
The rest of us programmers just needed to know how to feed the dates into
his formula. For query tool users, we had to create an auxiliary file that
provided the dates in local format.
Paul Nelson
Cell 708-670-6978
Office 409-267-4027
nelsonp@xxxxxxxxxxxxx
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Birgitta Hauser
Sent: Wednesday, January 28, 2015 4:32 AM
To: 'Midrange Systems Technical Discussion'
Subject: Physical Files with numeric dates?
We just had a discussion tody concerning numeric date and time fields.
And just because I'm curisous:
How many of you are still using numeric fields (may be a rather big crowd -
at least those working with old applications) But how many of you are using
date fields in your tables where the year or century year is NOT in the
first position, i.e. in a Format MMDDYY or MMDDYYYY or DDMMYY or DDMMYYYY?
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok) "What is
worse than training your staff and losing them? Not training them and
keeping them!"
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.