Products Downloads


French version


 


ADELIA

VADELIA

SADELIA

WADELIA

EADELIA

(I/B)

(I/B)

(B)

(I/B)

(B)


Warning: In the case of ADELIA programs, this function is not compatible with C generator.


Description

This predefined function is used to convert a DATE type variable to an alphanumeric variable.


Syntax

Result = &DATE_TO_ALPHA(Date format;Date)


Parameters


Description

Contents

Controls

Result

Alphanumeric variable.

Alphanumeric variable (in the specified format) corresponding to the date entered as a parameter.


Date format

Four-position alphanumeric constant.

Indicates the date format.

Possible variables:

*DMY, *EUR, *ISO, *JIS, *JUL, *MDY, *SYS, *USA, *YMD

Mandatory parameter.

Date

DATE type variable.

Date to be converted to an alphanumeric variable.

Mandatory parameter.


Important note: The *SYS parameter cannot be used for ADELIA programs. In addition, with VADELIA and SADELIA programs, if the *SYS function is used in an AS/400 server part, it is not taken into account and is replaced with the *ISO value.


Alphanumeric representation of DATE type fields according to their format:


Format name

Description

Format (Default separator)

Length

Example

2-Digit Year Formats

*MDY

Month/Day/Year

mm/dd/yy

8

01/15/01

*DMY

Day/Month/Year

dd/mm/yy

8

15/01/01

*YMD

Year/Month/Day

yy/mm/dd

8

01/01/15

*JUL

Julian

yy/ddd

6

01/015

4-Digit Year Formats

*ISO

International Standards Organization

yyyy-mm-dd

10

2001-01-15

*USA

IBM USA Standard

mm/dd/yyyy

10

01/15/2001

*EUR

IBM European Standard

dd.mm.yyyy

10

15.01.2001

*JIS

Japanese Industrial Standard - Christian Era

yyyy-mm-dd

10

2001-01-15

*SYS

Client machine format

Unknown

Unknown

Unknown


Note: in RPG, concerning *MDY, *DMY, *YMD and *JUL formats, the admitted range for years is 1940 to 2039.


Example

WALPHA = &DATE_TO_ALPHA('*EUR';WDATE)


List of predefined functions by topic


↑ Top of page

  • Aucune étiquette