Comparing Two Dates

To determine the difference in days between two dates, call the date difference function, date_diff():

long date_diff(date1_stp, date2_stp, format_stp)
 
UCHAR *date1_stp;
/* First date string
*/
UCHAR *date2_stp;
/* Second date string
*/
UCHAR *format_stp;
/* Date format string to use
*/

This function converts both dates to Julian dates and finds the difference with the formula:

difference = date2 -  date1


Home Contents Previous Next