Products Downloads


French version


 


ADELIA

VADELIA

SADELIA

WADELIA

EADELIA

(I/B)

(I/B)

(B)

(I/B)

(B)


Description

This predefined function is used to check the validity of the date specified as a parameter.


Syntax

Result = &CONTROL_DATE8(Date format;Date)


Parameters


Description

Contents

Controls

Result

One-position alphanumeric variable.

Possible values:

0 Date not valid

1 Date valid


Date format

Three-position alphanumeric variable or constant.

Format for the date set as a parameter.

Possible values:

DMY Day/Month/Year

DYM Day/Year/Month

MDY Month/Day/Year

MYD Month/Year/Day

YMD Year/Month/Day

YDM Year/Day/Month

Mandatory parameter.

Date

Eight-position numeric variable or constant.

Date to be checked.

Mandatory parameter.


Example

FORMAT = 'YMD'

ZORDER_DATE = 20020229

CTL_DATE = &CONTROL_DATE8(FORMAT;ZORDER_DATE)

PREPARE_MSG 0002 ZORDER_DATE

IF   CTL_DATE = '0'

ANOMALY

END

*

* CTL_DATE is equal to 0 (date invalid: February 29th 2002).


ZORDER_DATE = 06052002

CTL_DATE = &CONTROL_DATE8('DMY';ZORDER_DATE)

PREPARE_MSG 0002 ZORDER_DATE

IF   CTL_DATE = '0'

ANOMALY

END

*

* CTL_DATE is equal to 1 (date correct: 6th May 2002).


List of predefined functions by topic


↑ Top of page

  • Aucune étiquette