Lasso Soft Inc. > Home

[Date_Difference]

[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 should be in Lasso date format. The second parameter is subtracted from the first parameter and the result is returned as an integer in specified units: -SecondsBetween, -MinutesBetween, -HoursBetween, -DaysBetween, -WeeksBetween.

  • Syntax
  • Parameters
[Date_Difference: Base DateSecond Date, -SecondsBetween]

[Date_Difference: Base DateSecond Date, -MinutesBetween]

[Date_Difference: Base DateSecond Date, -HoursBetween]

[Date_Difference: Base DateSecond Date, -DaysBetween]

[Date_Difference: Base DateSecond Date, -WeeksBetween]
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.
Examples

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', -WeeksBetween]
<br>[Date_Difference: '12/26/2001', '12/25/2001', -DaysBetween]
<br>[Date_Difference: '12/26/2001', '12/25/2001', -HoursBetween]
<br>[Date_Difference: '12/26/2001', '12/25/2001', -MinutesBetween]
<br>[Date_Difference: '12/26/2001', '12/25/2001', -SecondsBetween]
Result:
<br>0
<br>1
<br>24
<br>1440
<br>86400
Tag Link [Date_Difference] Category Date
Type Substitution Data Source Any
Support Preferred Version 3.0
Output Type Decimal Security None
Implementation Sets Lasso 5.0,LDML3x

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft