11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

STATUS Function Return Values<br />

After you execute ICONV D, the STATUS function returns one of the values<br />

described in the following table.<br />

Value Description<br />

0 Successful conversion of a valid date.<br />

1 Invalid input date.<br />

2 Invalid conversion specification.<br />

3 Date was converted correctly, but month and day were inverted in input value.<br />

STATUS Function Return Values<br />

Note: After you execute the ICONV D function, the STATUS function returns a code<br />

indicating the execution status of the conversion of the last array element only.<br />

Examples<br />

The following table describes common date conversions and their results.<br />

Value Code Result<br />

09/15/85 D 6468<br />

12/31/67 D 0<br />

December 31, 1967 D 0<br />

01/29/1988 D 7334<br />

Common Date Conversions<br />

In the following example, the program segment prints the date in internal and display<br />

format:<br />

INPUT IN_DATE<br />

INTERNAL = ICONV(IN_DATE,"D")<br />

OUTPUT = OCONV(INTERNAL, "D4/")<br />

PRINT IN_DATE,INTERNAL,OUTPUT<br />

ICONV Date (D) 1-338

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!