Hello David,

I also am a newbie from a VB background.  There is no DateDiff() function in
the Palm OS, but there is a function called DateToDays() that returns the
number of days since 1/1/1904.  If you do a DateToDays() on both dates, and
take the difference, you'll have the number of days from one to the other.

Of course, this only works for the "d" interval of the DateDiff() function.
For the others, you'll have to modify the algorithm.

Before you ask, DateAdd("d", lNumDays, dtDate) can be simulated using the
TimAdjust() function.  This function modifies a date by adding an interval
(in seconds) to the DateTime value passed to it.  Keep in mind, this one
takes a DateTimeType structure not a DateType structure like DateToDays().

I hope this helps,

----------------------------------------------------------------------
Larry Tubbs Jr., MCSD               Silverleaf Resorts Inc., NYSE: SVR
[EMAIL PROTECTED]        http://home.sprintmail.com/~ltubbs



-----Original Message-----
From: David Dai [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 06, 2000 11:59 AM
To: '[EMAIL PROTECTED]'
Subject: DateDiff


newbie question:
        I need to find a function to tell the date difference. Similar to
vb's datediff('d',date1, date2). Does any function exist like that?




Reply via email to