Not to worry,

DateToInt is not a function, it's a macro that converts the structure to an
Int16.  There is also an accompanying macro for the TimeType structure.
They're both in DateTime.h and fairly straight forward.

//************************************************************
//* Date and Time macros
//***********************************************************

// Convert a date in a DateType structure to an UInt16.
 #define DateToInt(date) (*(UInt16 *) &date)
 
 
// Convert a date in a DateType structure to a signed int.
 #define TimeToInt(time) (*(Int16 *) &time)


        Hope that helps,

        Aaron Hansen


> -----Original Message-----
> From: Jamie Macleod [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 30, 2000 9:17 AM
> To: Palm Developer Forum
> Subject: DateToInt
> 
> 
> I'm sure I'll get flamed for daring to ask a question on this 
> newsgroup, but
> I have searched eGroups, www.palm.com, sdk 3.5 docs, etc with no luck.
> 
> I am looking at the souce code for the Todo and Datebook 
> examples to see how
> they implement dates.  I noticed these two programs use a 
> function called
> DateToInt(), but I can't find reference to this function 
> anywhere.  The
> comments say that a DateToInt() returning a negative number 
> means no date.
> My question(s) is, what is the proper way to set a DateType 
> to no date, and
> where do I find documentation on DateToInt()?  Thank you all.
> 
> Jamie
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to 
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
> 


-- 
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