Hi,
to display the date in a selector trigger, do
DateToAscii(month, day, year,
(DateFormatType)PrefGetPreference(prefLongDateFormat),
dateStr);
CtlSetLabel(objectPtr, dateStr);
month, day, year should be the components of the date, objectPtr will be a
pointer to the selector trigger object and dateStr will be of type
char dateStr[longDateStrLength]
(if you want to display the date in a shorter way, use prefDateFormat and
dateStringLength)
Note that CtlSetLabel will only pass a pointer to the string to the object, so
dateStr must exist for as long as the selector is displayed.
Daniel
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/