


CAN WE USED LENGTH 4 IN PLACE LENGTH 2 ?
No.
IF NOT THEN WHY?
Because it is defined by the system with a length of 2.
This isn't the definition of a 'year', but it is the definition of the QYEAR system value. If you use a system value, you must use the defined length.
The <help> text for the RTNVAR() parameter of the RTVSYSVAL command tells you the acceptable lengths of all system values.
As others have said, a 4-digit year value can be accessed in other ways, but not with QYEAR.
Tom
QYEAR is onlyh a 2 position value.
To get the century you would also need to retrievfe QCENTURY
Other options are to use the Job Date or Timestamp


yes sir definitely
CAN WE USED LENGTH 4 IN PLACE LENGTH 2 ?
IF YES THEN HOW?
IF NOT THEN WHY?
Rather than retrieving QDATE, QTIME, and QYEAR you could just retrieve QDATETIME. QDATETIME is a CHAR(20) from which you can substring out the 4-digit year, the date, and the time.
thank you sir