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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / narmatha
In ds1 we can initialize one fmt.. after tat in ds2, int
another fmt. by using move opc we can move 1 fmt to another
fmt.. eg:
I DS1 DS
I 1 6 DDMMYY
I 1 2 DD
I 3 4 MM
I 5 6 YY Same like DS2 *MDY
c movel DD DD1 like MM1 , YY1, if we want sep
means int '/' then we can use...
| Is This Answer Correct ? | 0 Yes | 0 No |
i would like to know under what circumstance the object will get locked on AS400.
How to read data from Nth member of a physical file containing some X number of members in it? "Provided member names are unknown"
What is the difference Return and InLr?
Can more than one subfile record be displayed on one line?
Job is in MSGW while reading the input file and writing a new record / updating a reacod due to Duplicate data error. What action would you take ( C D I R )...?
What is the compilation option that has to he specified while compiling an RPC program which uses a file having date data type field?
what is the difference between the cpyf command crtdupobj command?
Why did we give STRSRVJOB while debugging batch program
what is difference between DSPFD and DSPFFD?please give me real senario with good example?
i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL program
how do you use commitment control in rpg?
What are the types of identifiers?