NC.DATECONV Function  
Previous  Top  Next

Description  
 
This routine will convert a date from normal presentation (external) format to machine stored (internal) format or machine stored to presented format.  
 
Syntax  
 
Uses the common area to pass the required processing information:  

Common Variable
Description of how the variable is used
Range/Comments
Param
Attribute 1 is "1" for external to internal convert or "2" for internal to external convert.
1 or 2

Attribute 2 is the date.
See below
 

The value passed in Param attribute 2 can be:  

"T"
assumes today's date (in internal or external format).
"+nnn"
adds nnn to today's date.
"-nnn"
subtracts nnn from today's date.
"dd"
where dd is the day of THIS month and THIS year.
"ddmm"
where ddmm is the day and month of this year. This is "mmdd" if the date format is American style.
"ddmmyy"
Full date with 2 digit year.
"ddmmyyyy"
Full date with 4 digit year.
 

document Remarks  
 
prcarrow If the date passed is invalid the COMMON variable Rtnflg will be returned containing 1 (One) otherwise it will contain 0 (zero).  

prcarrow An alternative routine is also supplied that does not use the common area to pass data but fields are defined within the CALL statement. See the next routine MV.DATECONV