PA_FormatDate

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_FormatDate (day; month; year; formatNum; result)

ParameterTypeDescription
dayshortDay of the date to format
monthshortMonth of the date to format
yearshortYear of the date to format
formatNumshortFormat to use
resultchar *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

String.

Error Handling

PA_GetLastError always returns eER_NoErr


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next