Table of Contents

Search

  1. Preface
  2. RulePoint
  3. RulePoint Concepts
  4. Using RulePoint
  5. RulePoint Objects
  6. Working with Topics
  7. Working with Connections
  8. Working with Sources
  9. Working with Responders
  10. Working with Responses
  11. Working with Watchlists
  12. Working with Analytics
  13. DRQL
  14. Working with Rules
  15. Working with Alerts
  16. Setting Access Controls
  17. Troubleshooting RulePoint Issues
  18. Connecting to an Ultra Messaging Application
  19. Creating an Ultra Messaging JMS Source

User Guide

User Guide

datedifference

datedifference

The datedifference analytic returns the difference between two dates in terms of years, months, days, hours, minutes, seconds.

Syntax Option 1

datedifference(startdate,enddate,dateformat,units)
The following table describes the required and optional arguments:
Argument
Required
Optional
Description
startdate
Required
The start date.
enddate
Required
The end date. The format of the start and end date must be same.
dateformat
Required
The date format followed for the start and end date.
units
Required
The difference unit. This can be years, months, days, hours, minutes, or seconds.
Example
when 1 yearsDiff df with datedifference(df.startdate,df.enddate, df.dateformat,df.unit) as result = 1 then response with body= “${result}”
The following table describes the result for the event property value that you pass:
Event Property Value
Description
Result
df.startdate= 2011/02/12 df.enddate= 2013/01/01
df.dateformat= yyyy/MM/dd
df.unit=years
Returns the difference between two dates in terms of year.
1

Syntax Option 2

datedifference(starttime,endtime,timeformat,units)
The following table describes the required and optional arguments:
Argument
Required
Optional
Description
starttime
Required
The start time.
endtime
Required
The end time. The format of the start and end time must be same.
timeformat
Required
The time format followed for the start and end date.
units
Required
The difference unit. This can be hours, minutes, or seconds.
Example
when 1 timeDiff df with datedifference(df.starttime,df.endtime, df.timeformat,df.unit) as result = 841 then response with body= “${result}”
The following table describes the result for the event property value that you pass:
Event Property Value
Description
Result
df.starttime= 09:14:11
df.endtime= 23:15:35
df.dateformat= HH:mm:ss
df.unit=minutes
Returns the difference between two times in terms of minutes.
841

0 COMMENTS

We’d like to hear from you!