Products Downloads


French version


 


ADELIA

VADELIA

SADELIA

WADELIA

EADELIA

(I/B)

(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(B) (C/S)


Warning: This instruction is only compatible with the Adelia version generating RPG or C, and with Visual Adelia programs.


Section for use

All


Syntax

TIME VarId


Description

This instruction is used to retrieve the system value containing the time, and the system date if specified.

The result variable VarId must be a numeric variable with 6, 12 or 14 characters with 0 decimal places, or else a DATE, TIME or TIMESTAMP type variable.


In numeric six-character variables, the time is retrieved in the form:


hhmmss

where

hh = hours, mm = minutes and ss = seconds.


In numeric twelve-character variables, the time and date are retrieved in the form:


hhmmssdddddd

where

hh = hours, mm = minutes and ss = seconds, and

where

dddddd = 6-digit format date with the:


- QDATFMT system format for AS/400 generation,


- YYMMDD format for Windows generation.


In numeric fourteen-character variables, the time and date are retrieved in the form:


hhmmssdddddddd

where

hh = hours, mm = minutes and ss = seconds, and

where

dddddddd = 8-digit date in the:


- QDATFMT system format for AS/400 generation,


- YYYYMMDD default format for Windows generation.


TIME type variables are used to retrieve the current time.


DATE type variables are used to retrieve the current date.


TIMESTAMP type variables are used to retrieve the current date and time. Microseconds are retrieved in blocks of 1,000 microseconds.


Note: DATE, TIME and TIMESTAMP type fields are not supported by the C generator for ADELIA programs.


Example

*

Let's assume that date is 1st December 2002; it is 10:30:02 A.M.


TIME TIME_06

*

If TIME_06 is 6-digit long, TIME_06 is equal to

103002


TIME TIME_12

*

If TIME_12 is 12-digit long, TIME_12 is equal to

103002011202

*

(example given for a U.K. system)


*

or

103002120102

*

(example given for a U.S.A system)


TIME TIME_14

*

If TIME_14 is 14-digit long, TIME_14 is equal to

10300220021201

*

(with a YYYYMMDD date format)


↑ Top of page

  • Aucune étiquette