[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.
[(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)]
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'))]
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 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft