Symbolic Value : Item (Field) Information

TYPE_xxx [TIME_RANGE] - Item Data Type - Time/Date List/Range
----------------------------------------------------------------------------------------------------------


#include <nsfdata.h>

Description :

Time/Date List or Range fields contains two or more Time/Date values and/or zero or more ranges of Time/Date values. Time/Date List or Range fields are stored in notes as items of TYPE_TIME_RANGE.

An item of TYPE_TIME_RANGE consists of a range header, an array of TIMEDATEs, and an array of TIMEDATE_PAIRs, as follows:

Sample Usage :

NOTEHANDLE     hNote;
char          *szFieldName;
TIMEDATE      *aTimeDates;
WORD           usCount;
DWORD          dwValueLen;
void far      *pvoidItemValue;
RANGE         *pRange;
TIMEDATE      *pTimeDate;
WORD           i;
STATUS         error;

dwValueLen = sizeof(RANGE) + (usCount * sizeof(TIMEDATE));
pvoidItemValue = (void far *) malloc ((size_t)dwValueLen);

pRange = (RANGE*)pvoidItemValue;
pRange->ListEntries = usCount;
pRange->RangeEntries = 0;
pRange++;
pTimeDate = (TIMEDATE*)pRange;

for (i = 0; i < usCount; i++)
{
   *pTimeDate = aTimeDates[i];
   pTimeDate++;
}
   
error = NSFItemAppend (hNote, ITEM_SUMMARY,
               szFieldName, strlen(szFieldName),
               TYPE_TIME_RANGE,
               pvoidItemValue, dwValueLen);

free (pvoidItemValue);


See Also :

ConvertTextToTIMEDATE
----------------------------------------------------------------------------------------------------------