|
Doesn't UDAY and *DAY always contain the value you are seeking? muthathal.ramasamy@xxxxxxx wrote:
Hello,If you want to extract the day from the system date ( I assume it as the numeric day)....You could try it with this sample RPGLE code.DDATE1 S D DATFMT(*MDY) C *MDY MOVE UDATE DATE1 C EXTRCT DATE1:*D DAY 2 C DAY DSPLY C DATE1 DSPLY C SETON LR If you want to do the same from CL.... PGM DCL VAR(&DATE1) TYPE(*CHAR) LEN(6) DCL VAR(&DAY) TYPE(*CHAR) LEN(2) RTVSYSVAL SYSVAL(QDATE) RTNVAR(&DATE1) CHGVAR VAR(&DAY) VALUE(%SST(&DATE1 3 2)) ENDPGMI have assumed the system date to be available in MDY format. Based on the system date format on your system, decide on the extraction positions.Thanks, Muthu Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.