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 an alphanumeric variable to a TIME type variable.


If the alphanumeric time is not valid for the specified format, the result field is reset to *LOVAL.


Syntax

Result = &ALPHA_TO_TIME(Time format;Alphanumeric time)


Parameters


Description

Contents

Controls

Result

TIME type variable.

Time set as a parameter converted to TIME type.


Time format

Four-position alphanumeric constant.

Indicates the time format.
Possible values:
*EUR, *HMS, *ISO, *JIS, *SYS, *USA

Mandatory parameter.

Alphanumeric time

Alphanumeric variable or constant.

Alphanumeric field containing a time in the specified format, to be converted to the TIME type.

Mandatory parameter.


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


Alphanumeric representation of TIME type fields according to their format:


RPG format name

Description

Format (Default separator)

Length

Example

*HMS

Hours:Minutes:Seconds

hh:mm:ss

8

14:00:00

*ISO

International Standards Organization

hh.mm.ss

8

14.00.00

*USA

IBM USA Standard.
AM and PM can be any mix of upper and lower case.

hh:mm AM
or
hh:mm PM

8

02:00 PM

*EUR

IBM European Standard

hh.mm.ss

8

14.00.00

*JIS

Japanese Industrial Standard - Christian Era

hh:mm:ss

8

14:00:00

*SYS

Client machine format

Unknown

Unknown

Unknown


Example

WTIME = &ALPHA_TO_TIME('*HMS';'13:45:42')


List of predefined functions by topic


↑ Top of page

  • Aucune étiquette