Formats a string in a field and places it in a date data variable
| Call | |
| #include <vv_date.h> | |
| int dc_todate(stp, datap, dfldp, cvbufp) | |
|
UCHAR *stp |
Pointer to string with user's field input |
| PTR datap | Pointer to variable to receive converted field input |
| DFIELDPTR dfldp | Pointer to a data field structure |
| PTR cvbufp | Pointer to a data conversion buffer |
| Returns | |
| 1 | Success. This is the only return value for this function |
| Description
dc_todate() copies the string containing the user's field input into the data variable. If necessary, the string is first reformatted to agree with the field's date format string. If PICSKIP is ON, the protected characters in the field string are deleted before the string is placed in the data variable. If TRAILBLANKS is ON, trailing blanks are retained. If TRAILBLANKS is OFF, trailing blanks are stripped by placing the null terminator '\0' after the last non-blank character in the string. The defaults are to retain the protected characters (PICSKIP is OFF) and to strip the trailing blanks (TRAILBLANKS is OFF). |
|
| Related Functions | |
| Cautions
dc_todate() expects a valid date in the field; therefore, no error checking is performed by this function. dc_todate() assumes that vf_date() has already validated the string. |
|