Tag Link | [Date_Difference] | Category | Date |
---|---|---|---|
Type | Substitution | Source Available | No |
Support | Preferred | Version | 3.0 |
Change | Unchanged | Data Source | Any |
Output Type | Duration, Integer | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x |
[Date_Difference] calculates the difference between two dates and returns the results in either seconds, minutes, hours, days, or weeks between the two dates.
The first two parameters can be either Lasso date data types or valid Lasso date strings. The second parameter is subtracted from the first parameter and the result is returned as an integer in specified units:
[Date_Difference: 'Base Date', 'Second Date',
[Date_Difference: 'Base Date', 'Second Date',
[Date_Difference: 'Base Date', 'Second Date',
[Date_Difference: 'Base Date', 'Second Date',
[Date_Difference: 'Base Date', 'Second Date',
Required Parameters | |
---|---|
Base Date | The starting date from which the difference is calculated. |
Second Date | The ending date from which the difference is calculated. |
Optional Parameters | |
Result Type | The units of the result. |
To calculate the difference between two dates:
Use the [Date_Difference] tag to calculate the difference between two dates. The following example returns the difference between two dates in several different formats.
<br>[Date_Difference: '12/26/2001', '12/25/2001',
<br>[Date_Difference: '12/26/2001', '12/25/2001',
<br>[Date_Difference: '12/26/2001', '12/25/2001',
<br>[Date_Difference: '12/26/2001', '12/25/2001',
<br>[Date_Difference: '12/26/2001', '12/25/2001',
<br>0
<br>1
<br>24
<br>1440
<br>86400