Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Show 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation not acceptable)

Answer Posted / sanjeet kumar

1)CVTDAT() DATE() RTNVAR() FROMFMT() TOFMT()

Source code is required to convert from one date format to another date format.

The source code in CLP is given below:

PGM
DCL VAR(&VAR1) LENGTH(6) TYPE(*CHAR) VALUE('YYMMDD')
DCL VAR(&RCVD) LENGTH(6) TYPE(*CHAR)
DCL VAR(&VAR2) LENGTH(4) TYPE(*CHAR)
DCL VAR(&VAR3) LENGTH(2) TYPE(*CHAR)
CHGVAR VAR(&VAR2) VALUE(%SST(&VAR1 3 4))
CHGVAR VAR(&VAR3) VALUE(%SST(&VAR1 1 2))
CHGVAR VAR(&RCVD) VALUE(&VAR2 *CAT &VAR3)
SNDMSG MSG(&RCVD) TOUSR(*USRPRF)
ENDPGM

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is message subfile?

1721


what is a primary file?

1717


How do I remove a flag or check no. or name when a user opens too many sessions?

2188


can a single screen format occupy a screen area above and below a subfile format ?

1637


which are control break logic indicators?

1077


Why we sometimes use same file name in file and tofile in ovrdbf and sometimes different?

1112


What Is The Purpose Of The "n" In The Following Calculation Specification?

1117


hi guys i am new for sqlrpgle, please suggest me good websites and theory and coding. plz plz its very urgent.

2544


define the purpose of the *cat function?

1640


How to reverse a string using RPG?

1459


what does opcode post do ?

1748


what is logical file?

1013


what is cab?

1155


what is the purpose of the indara keyword?

1730


what are the various types of device files?

1647