11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Note: Following SMA standards, Monday is the first day of the week (1). If<br />

UDT.OPTIONS 29 is on, Sunday converts to 7 instead of 0.<br />

STATUS Function Return Values<br />

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

described in the following table.<br />

Examples<br />

The following statements are taken from the sample program in Appendix A,<br />

“Sample Program,” in Developing <strong>UniBasic</strong> Applications. It converts the date stored<br />

in internal format in the ORDERS file. The formatted date is in MM/DD/YYYY<br />

format.<br />

1-491 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

Code Description<br />

An Valid for day, quarter, and month only (WAn, QAn, and<br />

MAn respectively). A specifies alphabetic format, and n<br />

indicates number of characters.<br />

Zn Valid for month and day only. Z specifies numeric format;<br />

and n indicates number of digits. Z without a digit and Z0<br />

suppress zeros.<br />

J Displays the Julian date (the number of days since<br />

January 1).<br />

OCONV Date Output Format Codes (continued)<br />

Value Description<br />

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

1 The input date was invalid.<br />

2 The conversion code was invalid.<br />

STATUS Function Return Values<br />

ORDER_DATE = OCONV(ORDER.REC,"D4/")

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

Saved successfully!

Ooh no, something went wrong!