This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Performs shallow copy of data from cDateTime to other cDateTime.
Syntax
<cDateTime>.Copy(sourceObject)
Returns
None.
Parameters
Name |
Type |
Optional |
Meaning |
sourceObject |
cDateTime |
No |
Another cDateTime object |
Remarks
Please note that shallow copy means that any change you do to the source object will be visible in the target object.
Also, any change made to target object will be applied to source object!
Restrictions
See also
Examples
' Create an object with current date and time
Dim firstDateTime As New cDateTime
' Set its values
firstDateTime.NewDate(2020, 12, 24)
firstDateTime.NewTime(20, 0, 0)
' Create another object with current date and time
Dim secondDateTime As New cDateTime
' Copy from firstDateTime - please note secondDateTime had to be initialized via NEW
secondDateTime.Copy(firstDateTime)
' Now both firstDateTime and secondDateTime represent the same date & time
MsgBox 0, firstDateTime.toString + "=" + secondDateTime.toString
secondDateTime.AddHours(5)
' Now you can see both source and target object are modified!
MsgBox 0, firstDateTime.toString + "=" + secondDateTime.toString