This function gets the outline property date format String.
Syntax
ESS_FUNC_M EssOtlGetDateFormatString( ESS_HOUTLINE_T hOutline, ESS_PSTR_T formatString)
Parameter | Data Type | Description |
---|---|---|
hOutline | ESS_HOUTLINE_T | Outline handle |
formatString | ESS_PSTR_T | Returns the outline date format string to this argument. |
Return Value
Returns:
0—If successful
formatString contains the outline date format.
Error number—If unsuccessful
Example
void TestGetSetDateFormatString() { ESS_STS_T sts = ESS_STS_NOERR; ESS_HOUTLINE_T hOutline = ESS_NULL; ESS_OBJDEF_T Object; ESS_SHORT_T length = 80; ESS_STR_T dateFormatString = ""; ESS_STR_T localeStr; ESS_USHORT_T count, i; ESS_STR_T* pdateStrings; ESS_STR_T* pformatStrings; memset(&Object, '\0', sizeof(Object)); Object.hCtx = hCtx; Object.ObjType = ESS_OBJTYPE_OUTLINE; Object.AppName = szAppName; Object.DbName = szDbName; Object.FileName = szFileName; sts = EssOtlOpenOutline(hCtx, &Object, ESS_TRUE, ESS_TRUE, &hOutline); /* Get current value */ sts = EssOtlGetDateFormatString(hOutline, &dateFormatString); printf("EssOtlGetSMDateFormatString sts: %d \n", sts); printf("\tDate format string: %s\n", dateFormatString); printf("\n"); localeStr = "English_UnitedStates.Latin1@Binary"; sts = EssOtlGetServerDateFormats(hCtx, localeStr, &Count, &pdateStrings, &pformatStrings); printf("EssOtlGetServerDateFormats sts: %d \n", sts); for (i = 0; i < count; i++) { printf("\nCase with %s:\n", pformatStrings[i]); sts = EssOtlSetDateFormatString(hOutline, pformatStrings[i]); printf("EssOtlSetSMDateFormatString sts: %d \n", sts); SaveOutline(hOutline); sts = EssOtlGetDateFormatString(hOutline, &dateFormatString); printf("EssOtlGetSMDateFormatString sts: %d \n", sts); printf("\tDate format string: %s\n", dateFormatString); } sts = EssUnlockObject(hCtx, Object.ObjType, Object.AppName, Object.DbName, Object.FileName); sts = EssOtlCloseOutline(hOutline); printf("EssOtlCloseOutline sts: %d\n",sts); }
See Also