Converting and formatting a date field
|Abstract:||Formatting date fields for effective display in Crystal Reports for LANSA Client|
|Submitted By:||LANSA Technical Support|
The "date" data-type has only recently been introduced on the AS/400 so most applications probably still store date information in a numeric field. To make use of the many sophisticated date formula functions in Crystal Reports for Windows, it is necessary to convert a numeric or alphanumeric database field containing a date to a proper date formula field.
Crystal Reports for LANSA Client: Date Fields (PDF 33KB) is a downloadable document that provides formulae for the most common field to date conversions. It contains formula examples for the following tasks :
- Converting an alphanumeric database field (containing "yy/mm/dd") to a date formula field.
- Converting a numeric database field (containing ccyymmdd) to a date formula field.
- Using the "picture" function to print an alphanumeric field as a date (comparable with a "mask" in the DDS).
- Format options to print a (proper) date field. Date formats depend on local preferences and site standards for which the defaults can be set in the File/Options menu.