<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > Date and Time > cDateTime > cDateTime_Methods > <cDateTime>.AddSeconds |
Description
Adds the specified number of seconds to the value of this cDateTime object.
You can subtract by using a negative number.
Syntax
<cDateTime>.AddSeconds(nSeconds)
Returns
None.
Parameters
Name |
Type |
Optional |
Meaning |
nSeconds |
Numeric |
No |
Positive or negative seconds to add or subtract |
Remarks
Restrictions
See also
Examples
' Create an object with current date and time
Dim myDateTime As New cDateTime
' Original form
MsgBox 0, "myDateTime:" + $CRLF + myDateTime.toString
' Modify the date
myDateTime.Seconds(4)
' Modified form
MsgBox 0, "myDateTime modified:" + $CRLF + myDateTime.toString