Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 24.0
Syntax
Code Block
languagenone
set resultDateTime = aDateTime.add(aDuration); 
set resultDateTime = aDateTime.subtract(aDuration);
Semantics

add() and subtract() add respectively subtract a duration to/from a DateTime object.

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNamecalculate_dates
PageWithExcerptINTERNAL:_designer_excerpts_asl
shouldDisplayInlineCommentsInIncludesfalse

For a deeper understanding of how you can calculate with DateTime objects, refer to DateTime Arithmetics.

SubstitutablesaDurationCan be any variable or object attribute having the type Base Components.Basic Behavior.DateTime.DurationStructure.  
resultDateTime The resulting DateTime object.
Examples
Code Block
languagenone
create duration; 
set duration.years = 3; 
set duration.days = 10; 
set duration.minutes = 45; 
set newDateTime1 = aDateTime.add(duration); 
set newDateTime2 = aDateTime.subtract(duration);
rp
Panel
titleRelated Pages: