Hello Roberto, Friday, January 16, 2004, 9:51:23 AM, you wrote:
RPM> Hi RPM> How i can to get date form palm Os ? RPM> Thanks RPM> ===== RPM> Roberto Pedrozo Mendes RPM> Arquiteto Sistemas J2EE RPM> CPqD - Campinas RPM> [EMAIL PROTECTED] RPM> ______________________________________________________________________ RPM> Yahoo! GeoCities: a maneira mais f�cil de criar seu web site gr�tis! RPM> http://br.geocities.yahoo.com/ I added my time function too. CharPtr Date (void) { //returns a string with the current system date DateFormatType dateFormat = (DateFormatType) PrefGetPreference(prefDateFormat); DateTimeType dateP; char dia[longDateStrLength]; CharPtr date; TimSecondsToDateTime(TimGetSeconds(), &dateP); DateToAscii(dateP.month,dateP.day,dateP.year,dateFormat, dia); date = MemPtrNew(StrLen(dia)+1); StrCopy(date, dia); return (date); } CharPtr Time (void) { // returns a string with current system time TimeFormatType timeFormat = (TimeFormatType) PrefGetPreference(prefTimeFormat); DateTimeType timeP; char hora[timeStringLength]; CharPtr time; TimSecondsToDateTime(TimGetSeconds(), &timeP); TimeToAscii(timeP.hour,timeP.minute,timeFormat, hora); time = MemPtrNew(StrLen(hora)+1); StrCopy(time,hora); return(time); } -- Best regards, Sebastian mailto:[EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
