LANSA Built-In Function CONVERTDATE in addition to CONVERTDATE_NUMERIC

  • CONVERTDATE Converts format of alphanumeric date.
  • CONVERTDATE_NUMERIC Converts format of numeric date.

Valid Date Formats for LANSA

Input Parameters

No Type Req/ Opt Description Min Len Max Len Min Dec Max Dec
1 A Req Date that is to last converted 1 20
2 A Req Format of appointment to last converted 1 1
3 A Req Format required of appointment inward furnish value 1 1

Output Parameters

No Type Req/ Opt Description Min Len Max Len Min Dec Max Dec
1 A Req Returned converted date 1 20
2 A Opt Return code (Y or N) for successful conversion 1 1

Sample code for LANSA Built-In Function CONVERTDATE

Convert a appointment plain #MDY inward appointment format MMDDYY (F) to appointment format YYYYMMDD (J) inward plain #YYMD: USE        BUILTIN(CONVERTDATE) WITH_ARGS(#MDY F J) TO_GET(#YYMD) 

Sample code for LANSA Built-In Function CONVERTDATE_NUMERIC

Convert a appointment plain #MDY inward appointment format MMDDYY (F) to appointment format YYYYMMDD (J) inward plain #YYMD: USE        BUILTIN(CONVERTDATE_NUMERIC) WITH_ARGS(#MDY F J) TO_GET(#YYMD) 


Sumber http://www.mysamplecode.com/