The below will do the current time, the current date works pretty much the
same... Get the date format from prefs and use DateToAscii to make a string
out of it.
DateTimeType dt;
TimeFormatType timeFormat;
Char strTime[timeStringLength];
//get the time in seconds from 1904 and make a DateTimeType
TimSecondsToDateTime(TimGetSeconds(), &dt);
//get the system time prefs to find out what format to display the current
time in
timeFormat = (TimeFormatType) PrefGetPreference(prefTimeFormat);
//get a string for the current time of day (hours and minutes)
TimeToAscii(dt.hour, dt.minute, timeFormat, strTime);
//draw it to the screen
WinDrawChars(strTime, StrLen(strTime), 30, 30);
>>hi
can anybody tell me how can i get current date and time to display on a
form
-Ezekiel Sanborn de Asis
Palm Developer Support
[EMAIL PROTECTED]
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/