Development tools : Global functions : Date category : natureDaysBetween
  
natureDaysBetween
Description
Returns integer representing the nature days between the two dates ignoring time difference.
Usage
Client side: Y
Server side: Y
Syntax
Integer natureDaysBetween(Date date1, Date date2)
Argument
date1
The date to be compared. The argument can by any date type data.
date2
The date to compare. The argument can by any date type data.
Return
Returns the days between the two dates in integer ignoring time difference. If date2 is before date1, negative number will be returned. If any of argument is empty (null), -1 will be returned.
Example
natureDaysBetween(2010/01/20 12:00:00, 2010/01/21 18:00:00)
returns 1.
natureDaysBetween(2010/01/20 23:59:59, 2010/01/21 00:00:01)
returns 1.
natureDaysBetween(2010/01/21 00:00:01, 2010/01/20 23:59:59)
returns -1.
Go up to
Date category