how to convert date format from one format to another i think
in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE
Answer Posted / keshar
IN RPG using DS we can change date format. For example go
through the link
http://tutorialindia.com/articles/as400/ile_rpg_iv_data_stru
cture_for_date_format_conversion.php
Another method is to convert date into another format is
MOVE command.
In MOVE command we can specify date format. But one should
take care about compatibility.
example:
*mdy MOVE field DATE
Also we can use %date inbuilt function to change character
into date. So use %date in this way:
1. First convert date1 into character using %char.
2. then use %date to convert into desirable date format.
syntax:
%DATE{(expression{:date-format})}
%date also use to fetch system date.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
how can you display specific subfile page on the screen in unequal subfile?
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
what is the difference between do while and do until?
what is *place and *auto keyword in prtf ?plz explain
how do I play {insert rpg system here}?
What is the difference between copybooks and subprocedures in as400?
How Chain operation copies the record's data to the input buffer for the program?
How can we know running job is batch or interactive?
If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?
how does the rpg element work?
How to write record if no field or the field are different in physical file in rpgle ?
how do I preserve and clean the array?
Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
How to call one program from another program in RPG? please help me with the code