Xojo.Core.Date.Add

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

Xojo.Core.Date.Operator_Add(interval As Xojo.Core.DateInterval) As Xojo.Core.Date

Supported for all project types and targets.

You use the "+" operator to add a Date and a Xojo.Core.DateInterval to get a new Date.

Sample Code

Get the date two months from today:

Var twoMonths As New Xojo.Core.DateInterval
twoMonths.Months = 2 // 2 month interval

// Get date two months from today
Var future As Xojo.Core.Date = Xojo.Core.Date.Now + twoMonths