Lasso Soft Inc. > Home

[Date->Subtract]

[Date->Subtract] subtracts a duration from a Lasso date variable. Modifies the variable value but does not output a value.

The first parameter is a Lasso date data type that has been cast using the [Date] tag. The second parameter is a valid Lasso duration data type that has been cast using the [Duration] tag.

Optional keyword/value parameters may be used in place of a duration to define what should be subtracted from the first parameter: -Millisecond, -Second, -Minute, -Hour, -Day, -Week.

  • Syntax
  • Parameters
[Date Variable->(Subtract:(Duration))]
[Date Variable->(Subtract: -Week=Integer)]
[Date Variable->(Subtract: -Day=Integer)]
[Date Variable->(Subtract: -Hour=Integer)]
[Date Variable->(Subtract: -Minute=Integer)]
[Date Variable->(Subtract: -Second=Integer)]
Optional Parameters
-Millisecond Subtract the specified number of milliseconds from the base duration.
-Second Subtract the specified number of seconds from the base duration.
-Minute Subtract the specified number of minutes from the base duration.
-Hour Subtract the specified number of hours from the base duration.
-Week Subtract the specified number of weeks from the base duration.
Examples

To subtract a duration from a specified date:

The following examples show the result of subtracting a duration from the date 5/22/2002.

[Var:'MyDate'=(Date:'5/22/2002')]
[$MyDate->(Subtract:(Duration:'24:00:00'))] 
[$MyDate] 
Result:
5/21/2002 00:00:00
Tag Link [Date->Subtract] Category Date
Type Member Data Source Any
Support Preferred Version 6.0
Output Type None Security None
Implementation LCAPI Sets Lasso 7.0, 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