Function _pards() Foundation
Writes a date value as a character string into a passed buffer.
void _pards(CHAR cBuffer[8],
XppParamList pList, ULONG ulIndex, ...);
No return value.
_pards() writes a date value which was passed as a parameter from Xbase++, into a buffer as a character string in the format "YYYYMMDD". The year is written with 4 digits, month and day with 2 digits, padded with zero if needed (Example: 7/22/94 -> "19940722"). Please note that the character string is not terminated with a NULL character.
When the parameter or the indexed array element do not contain a date value, the buffer is not changed. If the value is a NULL date, the character string is filled with blank spaces.
/*
Outputs a formatted date value to stdout.
*/
#include <xpppar.h>
#include <stdio.h>
CHAR buffer[8];
/* Is parameter 3 a date? */
if ( XPP_IS_DATE( _partype(<pList>, 3) ) )
{
_pards(buffer, <pList>, 3);
printf("%.2s. day in the %.2s. month of the year %.4s .\n",
&.buffer[6], &.buffer[4], buffer);
}
else
printf("Error: Parameter 3 is not a date!\n");
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.