NLCONVCUSTDATE [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation
MPE/iX Intrinsics Reference Manual
NLCONVCUSTDATE
NM and CM callable.
Converts the custom date format from a character string to a numeric
value; checks the input string by using the formatting template returned
by item 2 of the NLINFO intrinsic, then converts the date to the general
date format as returned by the CALENDAR intrinsic.
Syntax
________________________________________________
| |
| U16 CA I16V |
| date:=NLCONVCUSTDATE(buffer,bufferlength,|
| I16V U16A |
| langnum,error); |
________________________________________________
Functional Return
date 16-bit unsigned integer (assigned functional
return)
Returns the date in the following format:
Bits Value/Meaning
7:9 Day of year
0:7 Year of century
Parameters
buffer character array(required)
Passes the formatted date to be converted into
custom date format. Leading and trailing blanks
are ignored.
bufferlength 16-bit signed integer by value (required)
Contains the length of buffer (in bytes).
langnum 16-bit signed integer by value (required)
Contains the language ID number, specifying the
custom date format for buffer.
error 16-bit unsigned integer array (required)
Returns two elements: the first element is the
error number; the second element is reserved and
always returns 0. The possible error number values
are:
Value Meaning
0 Successful
1 *NLS not installed
2 *Specified language not configured
3 Invalid date string
4 Invalid string length
5 *NLS internal error
6 *NLS internal error
7 Separator character in buffer does not match custom
date template
8 Length of date string > 13 characters (excluding
leading and trailing blanks)
* Do not apply to calls with a langnum equal to 0
(NATIVE3000/XL).
NOTE When a byte array is passed the code receives the starting position
and the length. There is no way for the code to determine if the
length you specifiy is correct. Therefore, an error of 4 (invalid
string length) is returned only if the specified buffer length is 0
or a negative number. If the passed array length is greater than
zero, but is still incorrect, unpredictable results can occur.
Related Information
Intrinsics NLCONVCLOCK, NLFMTCALENDAR, NLFMTCLOCK,
NLFMTCUSTDATE, NLFMTDATE, NLFMTLONGCAL
Commands None
Manuals Native Language Programmer's Guide (32650-90022)
MPE/iX 5.0 Documentation