_undate.utl Utility - Convert Date Strings to Stored Format
Syntax
call "_undate.utl",date_string$,julian_variable{,date_mask$}
Description
The _undate.utl utility parses a date or time string in any format, typically !DATE format, and converts it to either a Julian date or a number compatible with the PRO/5 TIM system variable.
This module does the opposite of the PRO/5 DATE() function.
Parameter |
Description |
date_string$ |
Date string in displayable format. |
julian |
Julian date (returned). This can be manipulated directly by the PRO/5 JUL() and DATE() functions. If it is a time, it will be in the same format as the PRO/5 TIM variable. If _undate.utl is unable to convert the specified date, it returns JULIAN=-1. |
date_mask$ |
Date format mask (optional). This mask is specified in the format used by the PRO/5 DATE() function. If not specified, the current !DATE mask is used. |
Examples
The following returns JULIAN=2450269 (or JUL(96,7,4)):
CALL BBEXT$+"_undate.utl","07/04/96",JULIAN,
"%Mz/%Dz/%Yz"
The following returns TIME=17.5:
CALL BBEXT$+"_undate.utl","17:30:00",TIME,
"%hz:%mz:%sz"
See Also
Functional Listing of EUS Utilities
See DATE(), JUL(), and TIM. See also STBL("!DATE").