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 to declare the pull button in AS/400..
how do I preserve and clean the array?
what is program status data structure?
are there any useful c runtime apis that I can call from rpg iv?
what do you mean by an input subfile, what are the keywords required?
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
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.
When it is desirable to describe files Internally?
what is the difference between do while and do until?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.
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?
thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400
what is data area and how it is used in rpg program ?
what is the necessary keyword needed to scroll subfile records?