Focal Point
DB2 Date Extraction Question.....

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9461087331

June 23, 2004, 03:01 PM
JackieInLR
DB2 Date Extraction Question.....
Could someone point me to the documentation that will help me extract the year from a DB2 'DATE'? (Focus 7.2.6 - MVS)

The date is defined as:

RI_BEGIN_DATE DATE NOT NULL,
RI-BEGIN-DATE PIC X(10).

I want to use only the year from the above field. I thought I had done this before, but just can't find my example.

Thanks,
Jackie
July 01, 2004, 11:07 AM
Tony A
Jackie,

What is the definition in your .mas file?

If it is YYMD, or the like, then you should be able to use the year within a define or display by specifying -

PRINT RI_BEGIN_DATE/YY

for the full four digit year

Depending on other actual and usage formats in you .mas there will be other solutions.