Mr.Sidc sirfor my question{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}
you have answered using MOVE opcode,can you illustrate me
with a small example sir very kind of you.
Answer / katiyar
A simple method, if you are good user of MOVE and MOVEL. Use
the below code to change date format of one type to another.
movel *date date1 4 0
move *date date2 4 0
move date1 datex
movel date2 datex
Where *date system defined date with mmddyyyy format. Hope
it will help.
===========================================================
Second method, You need to define Data Structure, as below.
Variable starts with 'F' is actually used for first type of
date.
And variable starts with 'S' actually used for second date
format.
I DS
I 1 80FDATE
I 1 40FYEAR
I 1 20FCC
I 3 40FYY
I 5 120SDATE
I 5 60SMO
I 7 80SDA
I 9 120SYEAR
I 9 100SCC
I 11 120SYY
FDATE is 8-digit date as YYYY/MM/DD format and SDATE is an
8-digit date as MM/DD/YYYY format.
Just convert by moving on to other. For MDY to ISO , use
below syntax.
Z-ADD MDYC SDATE
Z-ADD SYEAR FYEAR
Z-ADD FDATE CYMD
To go from ISO to MDY, you first z-add to fdate, then z-add
fyear to syear, and then z-add sdate into your MDY date.
==========================================================
| Is This Answer Correct ? | 6 Yes | 0 No |
what is difference between DSPFD and DSPFFD?please give me real senario with good example?
Anybody know the difference of primary file and full procedural file
what is the necessary command needed before OPNQRYF and why?
ESCAPE message sent by child program can be handled by parent program using which keyword?
Hi,This is raju.Can any body give me the real experience answer for this question? 1.What is the significance of *MAP and *DROP in the CPY command?
what is file information data structure?
is this a rpg channel?
The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA).How do i get the called program name in PGMB to print it on the spool file?(calling program name should NOT be hard coded or passed as parameter to called program?
To check the locks , we use cmd WRKOBJLCK , but how we confirm whether it's objeck lock / member lock. I confused with the Lock type and Status values...Can any body please tell me ...
Have a join logical file with more than one members with different record formats. So how can we read the different members from this file and also how we can read the different record format from the join logical?
what is kids-rpg?
program to find the number of objects used in a given program through a display.