× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



DMY is not an accepted date ......but I do see the point and obviously MDY
and DMY can both be valid at the same time....which is which....




From:
"DeLong, Eric" <EDeLong@xxxxxxxxxxxxxxx>
To:
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Date:
05/14/2008 12:41 PM
Subject:
RE: Date verification with multiple values on Green Screen



I think you've opened the can-o-worms with this one... This is similar to
the name-parsing question from a few weeks ago....

Ok, so I am a user of this app, and I enter 060708 (six digit date). How
would your program ever determine if this is *MDY, *YMD, or *DMY? You
cannot... Eight digit dates are not much better...

Using date seperator values with an eight digit date format might work ok,
as long as the users always use the correct seperator character for the
format being entered... So, '05/06/2007' could be processed as format
*USA (month 05, day 06), where '05.06.2007' could process as format *EUR
(month 06, day 05).... Probably not reasonable for the users to always
know which seperator value to use.

I do not think this requirement to accept date input in multiple formats
will add value to your application. More likely, it will cause a great
deal of grief when the program mis-identifies the correct format and gets
your months and days mixed up.

I might recommend a second field where the users can select the date
format they will be using for this session.

hth,
Eric

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Doug Palme
Sent: Wednesday, May 14, 2008 11:22 AM
To: RPG Midrange L
Subject: Date verification with multiple values on Green Screen


I need to allow the users to enter any of the following values as a valid
date type on a display file:

010108 // Six digit date

20080101 // eight digit ISO date type

01012008 // eight digit USA date type

01/01/2008 // ten digit USA date type

I thought I could check the length of the field coming in, so if anything
is other than 6,8, or 10 it is automatically an invalid date...that part
is easy......

I wanted to check for a valid date value with the TEST(DE) but it seems
that will not work either since even though 010108 is tested as

TEST(DE) *MDY DateField;

It generates an error...which I am assuming is because the field is a 10a
and not a 6,0.

So I would need to check and make sure that it is also numeric for the 6
and 8 digit entries correct?

I know, it sounds crazy, but that is what I have been instructed to
do......


This transmission may contain information that is privileged, confidential

and/or exempt from disclosure under applicable law. If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. If you received this
transmission in error, please immediately contact the sender and destroy
the material in its entirety, whether in electronic or hard copy format.
Thank you.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.