You are here: LANSA for i User Guide > 3. Files > 3.15 Virtual Fields > Date Conversion Examples
Date Conversion Examples

This screen demonstrates the use of the "Date conversion of a field" option and how it may be used to convert a date from one date format to another date format.

Convert the Employee's start date field EMPSDT which is stored in YYMMDD format in the Employee master file EMPMST to DDMMYY format in the EMPDMY field for screen inquiry purposes:

 

 

 DC@P201608            Date Conversion of a Field                      

                                                                       

 File: EMPMST     Employee Master file                                 

                                                                       

 Virtual field: EMPDMY     Employee start date (screen display format) 

                                                                       

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

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

                                                                       

 "Real" field to convert from  . . . . . . . . .  EMPSDT               

                                                                       

 "Virtual" field date format is  . . . . . . . .  DDMMYY               

                                                                       

 "Real" field date format is . . . . . . . . . .  YYMMDD               

                                                                       

                                                                       

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