| Contents |
#include <codecogs/units/date/datediff.h>
using namespace Units::Date;
| int | dateDiff (int startDate, int endDate)[inline] Computes the number of days between two serial Julian dates
Open Office: DATEDIFF | |
| Integer | cc_dateDiff (Integer startDate, Integer endDate) This function is available as a Microsoft Excel add-in. |
| intdateDiff( | int | startDate | |
| int | endDate | )[inline] |
inline int dateDiff(int nDateStart, int nDateEnd) { return nDateStart - nDateEnd; }
#include <stdio.h> #include <codecogs/units/date/date.h> using namespace Units::Date; void main() { printf("\n Difference=%d days", dateDiff(date("12-8-2004"), date("20-8-2004"))); // Difference=8 days }
| startDate | and... |
| endDate | are serial Julian dates (see date ). The return value is signed, so if StartDate occurs before endDate then a negative answer will be returned. See date , for details on creating these numbers. |