Trying to get the right year from DateDaysToDate
Can someone please tell me why I am not getting back
the right year from the following code?
DateTimeType date;
DateType startDate;
DateType todayDate;
UInt32 year, timeInSeconds, todayDateNumber = 0;
timeInSeconds = TimGetSeconds();
TimSecondsToDateTime (timeInSeconds, &date);
todayDate.year = date.year;
todayDate.month = date.month;
todayDate.day = date.day;
todayDateNumber = DateToDays(todayDate);
DateDaysToDate(todayDateNumber, &startDate);
year = startDate.year + 1904;// Year is not 2001
__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/