- 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 be converted | 1 | 20 | | |
2 | A | Req | Format of date to be converted | 1 | 1 | | |
3 | A | Req | Format required of date in return 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 date field #MDY in date format MMDDYY (F) to date format YYYYMMDD (J) in field #YYMD:
USE BUILTIN(CONVERTDATE) WITH_ARGS(#MDY F J) TO_GET(#YYMD)
Sample code for LANSA Built-In Function CONVERTDATE_NUMERIC
Convert a date field #MDY in date format MMDDYY (F) to date format YYYYMMDD (J) in field #YYMD:
USE BUILTIN(CONVERTDATE_NUMERIC) WITH_ARGS(#MDY F J) TO_GET(#YYMD)
No comments:
Post a Comment
NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.