DTW_TIME

AIX HP-UX Linux OS/2 OS/390 OS/400 PTX SUN Win NT
X X X X X X X X X

Purpose

Returns the current system time in the specified format.

Format

@DTW_TIME(stringIn, stringOut)

@DTW_TIME(stringOut)

@DTW_rTIME(stringIn)

@DTW_rTIME()

Parameters

Table 53. DTW_TIME Parameters
Data Type Parameter Use Description
string stringIn IN A variable or literal string specifying the time format. Valid formats are:

C - Civil time (hh:mmAM/PM using a 12-hour clock)

L - Local time (hh:mm:ss)

N - Normal time (hh:mm:ss using a 24-hour clock); default

X - Extended time (hh:mm:ss.ccc, using a 24-hour clock and where ccc is the number of milliseconds)

H - Number of hours since midnight

M - Number of minutes since midnight

S - Number of seconds since midnight

string stringOut OUT A variable that contains the time in the specified format.

Return Codes

Table 54. DTW_TIME Return Codes
Return Code Explanation
-1001 The server could not process a Net.Data request to allocate memory.
1003 An incorrect number of parameters were passed on a function call.
1005 A parameter passed on a function call, required to be a string variable, was of a different variable type.
1006 A literal string was passed on a function call for a parameter which was required to be an output parameter.
1007 A parameter contains a value which is not valid.

Examples

Example 1: Twenty-four hour clock format

@DTW_TIME(results)

Example 2: Civil time format

@DTW_TIME("C", results)

Example 3: Returns the number of minutes since midnight with the function call

@DTW_rTIME("M")

Example 4: Returns the default time and data formats with the function call

%REPORT{
<p>This report was created at @DTW_rTIME(), @DTW_rDATE().</p>
%}


[ Top of Page | Previous Page | Next Page | Index ]