Hello:
I was having trouble using DateTypes:
<code>
ULong seconds = TimGetSeconds();
DateType date;
DateSecondsToDate(TimGetSeconds(), &date);
// date now 4 years prior to current date
ULong addSeconds = (4 * 365.25 * 24 * 60 * 60); // add four years
seconds += addSeconds;
DateSecondsToDate(seconds, &date);
// date now current day of the year 100 (when current date in 2000)
// is this some sort of y2k problem?
// using DateTimeType seems to fix the problem
DateTimeType timer;
TimSecondsToDateTime(TimGetSeconds(), &timer);
// timer now has correct current date.
</code>
Does anyone know if there is a know advantage for using
DateTimeTypes versus using DateTypes? I saw a post on the archives
where a developer wondered if DateTypes even existed in the api.
Advice welcome.
Mark
--
Mark W. Alme
Analyst
Alme & Associates
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/