HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

NLCONVCUSTDATE

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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:

BitsValue/Meaning
7:9Day of year
0:7Year 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:

ValueMeaning
0Successful
1*NLS not installed
2*Specified language not configured
3Invalid date string
4Invalid string length
5*NLS internal error
6*NLS internal error
7Separator character in buffer does not match custom date template
8Length 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)

Feedback to webmaster