HP 3000 Manuals

DATE$ [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

DATE$ 

If the system date has been set, the DATE$ function returns an
eight-character string that contains the current system date.

If the system date has not been set, the DATE$ function returns the null
string.

Syntax 

DATE$ [(num_expr)]

Parameters 

num_expr         Determines date format as shown in Table 5-4.

          Table 5-4.  Effect of DATE$ Function Parameter 

---------------------------------------------------------------------------------------------
|                   |                                                                       |
|     num_expr      |                              Date format                              |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
| Not specified     | The default specified by HP Business BASIC/XL Configuration Utility   |
|                   | (see appendix C). If HP Business BASIC/XL Configuration Utility has   |
|                   | not set default, it is U. S. format.  This is compatible with the     |
|                   | HP250.                                                                |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
| Integer zero      | U. S. format:  mm/dd/yy.                                              |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
| Integer one       | European format:  dd.mm.yy.                                           |
|                   |                                                                       |
---------------------------------------------------------------------------------------------
|                   |                                                                       |
| Other             | Error.                                                                |
|                   |                                                                       |
---------------------------------------------------------------------------------------------

Examples 

     10 DIM Us_date$[8], Eur_date$[8], Default_date$[8]
     20 Us_date$=DATE$(0)
     30 Eur_date$=DATE$(1)
     40 Default_date$=DATE$
     50 PRINT Us_date$
     60 PRINT Eur_date$
     70 PRINT Default_date$
     99 END

If the system date is June 12, 1984, the above program prints:

     06/12/84
     12.06.84
     06/12/84



MPE/iX 5.0 Documentation