Function _conGetDS() Foundation
Writes the content of a date type container into the passed buffer as a character string.
XPPAPIRET _conGetDS(ContainerHandle chd, CHAR pcBuffer[8]);
The function returns an error code (XPP_ERR_...) when the container chd is not a date. If the return value is NULL, the operation was successful.
_conGetDS() is used to access a date container. The date value is written as a character string in the format "YYYYMMDD" into the passed buffer. The year is written with four digits, month and day with two digits, zero padded if needed (example: 7/22/94 -> "19940722"). The character string is not terminated with a NULL character. If the value is a NULL date, the character string is filled with blank spaces. This behavior corresponds with the Xbase++ function DtoS(), therefore the date settings of SET DATE have no effect.
/*
Writes the date value of a container into the buffer as a string.
*/
#include <xppcon.h>
ContainerHandle hDate;
XPPAPIRET xr;
CHAR buffer[9];
/* Assigns a value to ... hDate */
xr = _conGetDS(hDate, buffer);
if (xr == 0)
{
/* ... Operations with the date string */
}
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.