Developing Apama Applications > Dashboard Function Reference > Scalar Functions > Date Difference
Date Difference
Returns the integer number of Date Part intervals by which Date 1 (rounded down to the nearest Date Part) is less than Date 2 (rounded down to the nearest Date Part). For example, the difference between 05/12/05 05:32 PM and 05/15/05 04:47 PM with Date Part set to d (for day) returns 3.
Arguments
This function has the following arguments:
*Date 1: Text string specifying the earlier date. It must be either a formatted date/time string or a Java standard date/time argument in milliseconds from Jan 1, 1970.
*Date 2: Text string specifying the later date. It must be either a formatted date/time string or a Java standard date/time argument in milliseconds from Jan 1, 1970.
*Date Part: Text string that specifies the date part with respect to which the difference is to be calculated. Specify s, m, h, d, w, M, q or y for seconds, minutes, hours, days, weeks, months, quarters or years.
The function returns a number.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.