I am trying to create a new record with default date and start time. I am
using the structure and code below. Now.day, now.year, now.month are
correct. But when move them to the record structure I get different values.
Now.day should equal record.date.day, but they are not.

What I am overlooking?

Thanks,

Todd

Here is my record format

    // Format for record
    typedef struct
    {
      DateType  date;   // Date of service perid
      DateTimeType start;   // Start of service period
      DateTimeType end;   // End of service period
      TimeType  totalTime;  // Time
    } ServDBRecord;

Here is the code in question:
     UInt16   index;
     ServDBRecord record;
     DateTimeType now;

     // Get current date for new Service Period
     TimSecondsToDateTime(TimGetSeconds(), &now);

     record.date.day = now.day;                        //now.day=11,
record.date.day = 20
     record.date.month = now.month;                 //now.month=12,
record.date.month = 7
     record.date.year = now.year;                        //now.month=2001,
record.date.year = 11



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to