>> DateType date;
>> DateSecondsToDate (TimGetSeconds(), &date);
>> I personally don't see what's wrong with this code, but it
>> always returns me the wrong date. What's the catch?
>
> Gee, it looks fine to me too. How are you determining that the date is
> wrong -- viewing it in a debugger, or displaying the date on the screen,
or
> something else? Just what wrong date does it return?
I don't know if the original poster tried to leave anything off above for
simplicity.. but if you are attempting to add or subtract anything to/from
TimGetSeconds() as part of this, make sure you don't run into a long vs int
issue... in other words:
DateSecondsToDate(TimGetSeconds() - (24 * 60 * 60), &date);
will *always* be wrong because 24*60*60 gets evaluated as an int, even
though the result is bigger than an int can hold.. I learned this the hard
way. :)
Someone else suggested DateTimeType date; ... this may be the problem.. I
had thought the original DateType was just a typo.. is there even a
DateType?
----------
Bradly J. Barton - [EMAIL PROTECTED]
Jenies Technologies Incorporated
(972) 602-1835
http://www.JTI.net
http://PalmInHand.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/