Or login with:
| 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. |
Source code is available when you buy a Commercial licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge