version 2003
PA_FormatDate (day; month; year; formatNum; result)
Parameter | Type | Description | |
day | short | Day of the date to format | |
month | short | Month of the date to format | |
year | short | Year of the date to format | |
formatNum | short | Format to use | |
result | char * | Formated string of value |
Description
The routine PA_FormatDate returns in result the string form of the date you pass in *day, *month, and *year, according to the format that you specify in formatNum.
This works like the String 4th Dimension function. Refer to the 4D Language Reference manual for more information, especially regarding the possibles values of formatNum.
Depending on default settings or on previous calls to PA_UsePStrings or PA_UseCStrings, result will be a Pascal or a C string.
Example
Format a date value :
char result[256]; // using C strings under Windows PA_FormatReal(12, 7, 2000, 7, result); // result is now "7/12/2000"
See Also
Error Handling
PA_GetLastError always returns eER_NoErr