hello,
i wrote a function that need to return the current device date. its return a
string (Charptr).
here is the function:
static CharPtr SetAutoDate ( void )
{
DatePtr the_date = NULL;
ULong DateInSec;
CharPtr theConvertDate;
// initilize the varibles:
the_date->month = 12;
the_date->day = 8;
the_date->year = 79;
theConvertDate = "12/08/79";
// get the seconds since 1/1/1904
DateInSec = TimGetSeconds ();
// convert the secounds to the current date
DateSecondsToDate ( DateInSec, the_date );
// convert the date to a string
DateToAscii ( the_date->month, the_date->day, the_date->year,
dfDMYWithDots,
theConvertDate );
return theConvertDate;
}
the Qs are:
1.) do i need to add teminate to the "theConvertDate" ( to add /0) or the
DateToAscii does it??
and if i need to add it myself how do i do it? how can i add it at the
end??
2.) i would like to get suggestions from others that have a deffirente kind
of view or same code.
if u can send me the answer to my own email.
tnx in advance :-)
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/