SetCustomDisplay
To set the custom date display format. This action is same as setup Custom Date Formats in Preference: Options : Miscellaneous.
BOOL SetCustomDisplay( LPCSTR lpcszDisplay, bool bUndo = false )
TRUE if succesfull, otherwise FALSE.
EX1
void Column_SetCustomDisplay_Ex1() { Worksheet wks = Project.ActiveLayer(); if(!wks) return; Column col(wks, 0); if( col ) { col.SetFormat(OKCOLTYPE_DATE); col.SetSubFormat(LDF_OBJ_CUSTOM); if( col.SetCustomDisplay("dd-MM-yy") ) printf("The custom display format of Column %u is %s\n", col.GetIndex()+1, col.GetCustomDisplay()); else printf("Fail to set custom format to this column\n"); } }
origin.h