9.11 Time object
Description
You can query the current date/time of the computer with the Time object.
List of methods/properties
Name | Type | Short description |
Weekday | Property | The current weekday |
Day | Property | The current day of the month |
Month | Property | The current month |
Year | Property | The current year |
Hour | Property | The current hour |
Minute | Property | The current minute |
Second | Property | The current second |
Millisecond | Property | The current millisecond |
Tick | Property | A continuous counter in milliseconds |
Description
This property returns the current weekday. Sunday is the first day of the week (0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday).
Syntax
Data type
Word
Type
Property, read-only
Example
At the end v[1] whould be the current weekday (e. g. on a tuesday v[1] whould be 2).
Description
This property returns the current day of the month.
Syntax
Data type
Word
Type
Property, read-only
Example
At the end v[1] whould be the current day of the month (e. g. at the 08. January 1987 this whould be 8).
Description
This property returns the current month. (1 = January, 2 = February, 3 = March, 4 = April, 5 = May, 6 = June, 7 = July, 8 = August, 9 = September, 10 = October, 11 = November, 12 = December)
Syntax
Data type
Word
Type
Property, read-only
Example
At the end v[1] whould be the current month (e. g. at the 08. January 1987 this whould be 1).
Description
This property returns the current year.
Syntax
Data type
Word
Type
Property, read-only
Example
At the end v[1] whould be the current year (e. g. at the 08. January 1987 this whould be 1987).
Description
This property returns the current hour.
Syntax
Data type
Word
Type
Property, read-only
Example
At the end v[1] whould be the current hour (e. g. at 12:30 this whould be 12).
Description
This property returns the current minute.
Syntax
Data type
Word
Type
Property, read-only
Example
At the end v[1] whould be the current minute (e. g. at 12:30 this whould be 30).
Description
This property returns the current second.
Syntax
Data type
Word
Type
Property, read-only
Example
At the end v[1] whould be the current second.
Description
This property returns the current millisecond.
Syntax
Data type
Word
Type
Property, read-only
Example
1
2
$
v[1] = Time.Millisecond
At the end v[1] whould be the current millisecond.
Description
This counter counts every millisecond up by one. The value of this property is equivalent to the Windows function GetTickCount. This property can be used to measure time differences. You simply save the value before and after an action. The difference is the required time for that action in milliseconds.
Syntax
Data type
Dword
Type
Property, read-only
Example
At the end v[1] whould be the current tick of the computer.