3 15 7 Date Conversion of a Field

LANSA for i

3.15.7 Date Conversion of a Field

This screen is displayed when the option to perform a Date conversion for a virtual field has been chosen from the Virtual field extended definition action box.

 

 

 DC@P201608            Date conversion of a field                      

                                                                       

 File : XXXXXXXXXX  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX       (XXXX )

                                                                       

 Virtual field : XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   

                                                                       

 Derive "virtual" field on input from file . . .  ___ YES, NO          

 Setup "real" field before output to file  . . .  ___ YES, NO          

                                                                       

 "Real" field to convert from  . . . . . . . . .  __________           

                                                                       

 "Virtual" field date format is  . . . . . . . .  ________             

                                                                       

 "Real" field date format is . . . . . . . . . .  ________             

                                                                       

                                                                       

 Fnn=Help  Fnn=Exit  Fnn=Cancel  Fnn=Messages  Fnn=Change  Fnn=Delete  

                                                                       

 

 

 

Working from the Date conversion of a field screen you can:

  • Review the date conversion extended definition of the virtual field currently being worked with.
  • Specify the date conversion extended definition of the virtual field currently being worked with.
  • Change the date conversion extended definition of the virtual field currently being worked with.
  • Delete the date conversion extended definition of the virtual field currently being worked with. There is no confirm option when delete has been specified for a virtual field extended definition.

Input Options

File

Is the name of the physical file currently being worked with.

Virtual Field

Is the name of the "virtual" field within the physical file currently being worked with. The value of the "virtual" field will be the result of the date conversion from the "real" field. The "virtual" field must be large enough to contain the result of/value for the date conversion otherwise unpredictable results could occur.

Derive "Virtual" Field on Input from File

Specifies whether the "virtual" field should be derived from the "real" field ("real" field can be either a "real" or "virtual" field name within this file) on input from file. Valid entries are "YES" or "NO".

Setup "Real" Field Before Output to File

Specifies whether the "real" field ("real" field can be either a "real" or "virtual" field name within this file) should be setup before output to file. Valid entries are "YES" or "NO".

"Real" Field to Convert from

Specifies the name of the field ("real" or "virtual" field name within this file) to be used for the date conversion to the resulting "virtual" field. The "real" field must be large enough to contain the result of/value for the date conversion otherwise unpredictable results could occur.

By entering a partial name or a '?' the single field selection screen will be displayed. The selection list will be built from the real and virtual fields in the current file's definition. Refer to 3.10.1 Select Fields When Working from File Definition Menu for more details.

"Virtual" Field Date Format Is

Specifies the date format to be used to convert the specified "real" field ("real" or "virtual" field name within this file) to the value of the "virtual" field. Valid date format values for this field are as follows:

SYSFMT

(QDATFMT)

SYSFMT8

(8 digit date in QDATFMT format)

DDMMYY

(Day, Month and Year)

MMDDYY

(Month, Day and Year)

YYMMDD

(Year, Month and Day)

DDMMYYYY

(Day, Month and Full Year)

MMDDYYYY

(Month, Day and Full Year)

YYYYMMDD

(Full Year, Month and Day)

YYMM

(Year and Month) 

MMYY

(Month and Year)

YYYYMM

(Full Year and Month)

MMYYYY

(Month and Full Year)

 

"Real" field date format is

Specifies the date format of the "real" field ("real" or "virtual" name within this file). Valid date format values for this field are as follows:

SYSFMT

(QDATFMT)

SYSFMT8

(8 digit date in QDATFMT format)

DDMMYY

(Day, Month and Year)

MMDDYY

(Month, Day and Year)

YYMMDD

(Year, Month and Day)

DDMMYYYY

(Day, Month and Full Year)

MMDDYYYY

(Month, Day and Full Year)

YYYYMMDD

(Full Year, Month and Day)

YYMM

(Year and Month)

MMYY

(Month and Year)

YYYYMM

(Full Year and Month)

MMYYYY

(Month and Full Year)

CYYMMDD

(Century indicator, Year, Month and Day)

 

Notes
  • The CYYMMDD format is only valid as a format for a real field on LANSA virtual field derivation. It can be defined in Visual LANSA, but not made operational.
  • If an alpha date field (real or virtual) is being converted to a resulting numeric date field (real or virtual), a check will be automatically performed to ensure the resulting numeric date field contains all numeric characters ("0" to "9"), if the resulting numeric date field does not contain all numeric characters (i.e. alpha characters have been found) the resulting numeric date field will be set to 0.
  • If a date containing just Month and Year is to be converted to a date containing Day, Month and Year, a day of  01 will be used for the resulting date. eg  MMYY of 1296 to be converted to DDMMYYYY will result in 01121996.
  • If a date containing zeros is to be converted to, for example, YYYYMMDD format, the resulting date will be 19000000.