Date.Constructor(CopyDate as Date)

From Xojo Documentation

Constructor
Date.Constructor(CopyDate as Date)

Sets the new date object to have the same date information as the passed date.

Sample Code

The following code sets the new Date to the previously created date and then displays it in a Label.

Var d1 As New Date

d1.Day = 13
d1.Month = 8
d1.Year = 1956

Var d2 As New Date(d1)
Label1.Value = d2.ShortDate