2,030 pts.
 Which format is dd/mm/yyyy
Is there a date format like this dd/mm/yyyy?

Software/Hardware used:
As400
ASKED: February 11, 2013  11:44 AM
UPDATED: February 11, 2013  1:06 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. TomLiotta   110,115 pts. , Iseriesas400   310 pts. , CharlieBrowne   33,695 pts. , Michael Tidmarsh   14,000 pts. , Harisheldon   5,475 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

The link in the ‘Answer’ is obsolete and does not cover all date formats. A better link might be DATFMT (Date Format) keyword for physical and logical files, but it’s not clear what kind of “date format” you are looking for.
 
Is it for a report? For a display file? For the CVTDAT command in a CL program? For a RPG or COBOL program to manipulate a date value?
 
A date format should only be important when a date value is being shown to a human. There might be no standard format name that matches your request, but you can generate it easily enough.
 
What exactly are you needing to do?
 
Tom

 110,115 pts.

 

Through a display file, user is entering date in dd/mm/yyyy format. I need to validate the date and save to file

 2,030 pts.

 

Thanks everyone, I am done with it with the help of TEST(DE)
 C     *EUR0         Test(DE)                DspfFld
Then catch the %error     

 2,030 pts.

 

The TEST op-code should trigger %error() if you run it against a date in dd/mm/yyyy format with *EUR0. It should always throw an error if there are any separators like you showed, even if the day, month and year are valid. You need a different method. — Tom

 110,115 pts.

 

My display file filed is only 8A. Separator is not expected. Need to validate it without separator. Please confirm in that case whether my approach is correct.

 2,030 pts.

 

That would make sense, but it’s different from what you asked in the question. And the question title means that others will have a harder time when searching for answers. Please ask questions that indicate what you need. Help will be much easier to give. — Tom

 110,115 pts.