result = CompareDates(date1$, date2$[, notime])
dd-mmm-yyyy hh:mm:ss |
The mmm constituent is a string with three characters identifying the
month. This can be Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct,
Nov, or Dec.
If you set the optional argument notime to True, only dates are compared.
In that case, the two strings you pass to CompareDates() must not contain
any time specifications.
The return value of CompareDates() indicates how the two dates are
related. The following return values are possible:
date1$ and date$ have exactly the same time
date1$ is later in time than date2$
date1$ is earlier in time than date2$
True to compare dates only (defaults to False)
NPrint(CompareDates("10-Dec-2009 13:34:12", "09-Dec-2009 15:36:21"))
NPrint(CompareDates("12-Dec-2009 23:59:59", "13-Dec-2009 00:00:00"))
NPrint(CompareDates("24-Dec-2009 20:00:00", "24-Dec-2009 20:00:00"))
The code above will do three date comparisons. The results will be:
1,2,0