Skip to main content Link Search Menu Expand Document (external link)

Procedure 5: Perform Date Arithmetic

Upon a date object, having been created it is possible to perform arithmetic on the dates. In this example one day is going to be added to the dates in the vector. To add a day to each value in vector type:

DatesPlusOne <- Dates + 1

img.png

Run the line of script to console:

img_1.png

Write the new vector out by typing:

DatesPlusOne

img_2.png

Run the line of script to console:

img_3.png

It can be observed that a day has been subtracted from the Dates vector?


Jube™. © Jube Holdings Limited 2022 to present.