ctdbGetFieldDefaultDateType
Retrieves the default value date type.
Declaration
CTDATE_TYPE ctdbGetFieldDefaultDateType(CTHANDLE Handle);
Description
Retrieves the default value date type used when converting strings to dates. Handle must be a FairCom DB API field handle.
Return
Value |
Symbolic Constant |
Explanation |
---|---|---|
1 |
CTDATE_MDCY |
Date format is mm/dd/ccyy |
2 |
CTDATE_MDY |
Date format is mm/dd/yy |
3 |
CTDATE_DMCY |
Date format is dd/mm/ccyy |
4 |
CTDATE_DMY |
Date format is dd/mm/yy |
5 |
CTDATE_CYMD |
Date format is ccyymmdd |
6 |
CTDATE_YMD |
Date format is yymmdd |
See Appendix A for a complete listing of valid c-tree Plus error values.
Example
/* check the default date type */
hField = ctdbGetField(hTable, 5);
if (ctdbGetFieldDefaultDateType(hField) != CTDATE_MDCY)
printf("Default date type is not OK\n");
See also
ctdbSetFieldDefaultValue(), ctdbGetFieldDefaultValue(), ctdbClearFieldDefaultValue(), ctdbIsFieldDefaultValueSet(), ctdbClearAllFieldDefaultValue(), ctdbSetFieldDefaultDateTimeType(), ctdbGetFieldDefaultTimeType()