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
Sets time part of cDateTime based on passed number of seconds.
It does not alter date in any way, only time.
Syntax
<cDateTime>.SecondsToDate(seconds)
Returns
None.
Parameters
Name |
Type |
Optional |
Meaning |
seconds |
Numeric |
No |
Value in seconds, 0 - 86399 |
Remarks
If the value is < 0, the time is not updated.
If the value is > 86399, modulo of value and 86400 is used to update the time (86401 becomes 1 second in time).
Restrictions
See also
Examples
' Create an object with current date and time
Dim firstDateTime As New cDateTime
MsgBox 0, "Original date/time: " + firstDateTime.toString
' Altering the time component with 70 seconds input
firstDateTime.SecondsToDate(70)
' Altered object will have time component 00:01:10.000, as 70 seconds is 1 minute and 10 seconds
MsgBox 0, "Altered date/time: " + firstDateTime.toString