Lasso Soft Inc. > Home

[Date->Difference]

[Date->Difference] determines the duration time between two Lasso dates.

The first parameter is a Lasso date data type that has been cast using the [Date] tag. The second parameter is a later Lasso date data type that has been cast using the [Date] tag. The second parameter is subtracted from the first and the output is a Lasso duration in hh:mm:ss format.

Optional parameters may be used to ouput a specified integer time value instead of a duration: -Millisecond, -Second, -Minute, -Hour, -Day, -Week, -Month, -Year. Lasso rounds to the nearest integer when using these optional parameters.

  • Syntax
  • Parameters
[(Date)->Difference:(Date)]
[(Date)->(Difference:(Date), -Year)]
[(Date)->(Difference:(Date), -Month)]
[(Date)->(Difference:(Date), -Week)]
[(Date)->(Difference:(Date), -Day)]
[(Date)->(Difference:(Date), -Hour)]
[(Date)->(Difference:(Date), -Minute)]
[(Date)->(Difference:(Date), -Second)]
Optional Parameters
-Millisecond Outputs an integer number of milliseconds between two dates.
-Second Outputs an integer number of seconds between two dates.
-Minute Outputs an integer number of minutes between two dates.
-Hour Outputs an integer number of hours between two dates.
-Week Outputs an integer number of weeks between two dates.
-Month Outputs an integer number of months between two dates.
-Year Outputs an integer number of years between two dates.
Examples

To determine the duration between two dates:

The following examples show how to calculate the time difference between two dates and return a duration.

[Var_Set:'MyDate'=(Date:'5/22/2002')]
[$MyDate->(Difference:(Date:'5/15/2002 01:30:00'))]
Result:
169:30:00
Tag Link [Date->Difference] Category Date
Type Member Data Source Any
Support Preferred Version 6.0
Output Type Duration, Integer Security None
Implementation LCAPI Sets Lasso 6.0

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