RulePoint
- RulePoint 6.1.2
- All Products
datedifference(startdate,enddate,dateformat,units)
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.
|
when 1 yearsDiff df with datedifference(df.startdate,df.enddate, df.dateformat,df.unit) as result = 1 then response with body= “${result}”
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
|
datedifference(starttime,endtime,timeformat,units)
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.
|
when 1 timeDiff df with datedifference(df.starttime,df.endtime, df.timeformat,df.unit) as result = 841 then response with body= “${result}”
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
|