> 1) What are the DateFormatType types, ie what values can I enter here? All of the date and time structure formats are in datetime.h
> 2) Also what will be the size of pString? How ever may bytes you allocated. I would suggest using the Date Time constants in datetime.h > I beleive that this is referenced in DateTime.h but I cannot find > DateTime.h. Look in the support/Incs directory where the PalmOS API is installed > > Note that the arguments to this function is Byte months, Byte Days,... > If I use the function > NoOfSeconds TimGetSecondsI(void) > to get the seconds and then Use the function > DateSecondsToDate(NoOfSeconds, DatePtr dateP) > the date is stored in the dateP structure. > Note that the variables for the dateP structure are Word year, Word month, > Word day. These are variables of size Word, while the arguments for Date to > Aschii is of size Byte. > In other words I cannot use > TimGetSeconds > DateSecondsToDate > DateToAscii to give me the date becuase variables of dateP do not match the > arguments DateToAscii. Yes you can. It works. > Also please not that there is no corresponding function TimSecondsToTime to > get the time. Try TimSecondsToDateTime > > If I use the function TimSecondsToDateTime because of missmatch of variables > and arguments as described above. It works > > 3)How can I get the current time TimGetSeconds() > 4)How can I convert it to Ascii? DateTimeType Now; char TimeString[timeStringLength+1]; char DateString[dateStringLength+1]; SystemPReferecnesType SystemPrefs; PrefGetPreferences(&SystemPrefs); TimSecondsToDateTime(TimGetSeconds(),&Now); TimeToAscii(Now.hour,Now.minute,SystemPrefs.timeFormat,TimeString); DateToAscii(Now.month,Now.day,Now.year,SystemPRefs.dateFormat,DateString); Viola! -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/