Date.TotalSeconds
From Xojo Documentation
This item was deprecated in version 2019r2. Please use DateTime.SecondsFrom1970 as a replacement. |
Property (As Double )
aDate.TotalSeconds = newDoubleValue
or
DoubleValue = aDate.TotalSeconds
Supported for all project types and targets.
or
DoubleValue = aDate.TotalSeconds
Supported for all project types and targets.
The number of seconds since 12:00AM, January 1, 1904, local time.
Notes
TotalSeconds is the "master" property from which other ways of expressing date/time are derived. A negative value of TotalSeconds indicates a Date/Time prior to January 1, 1904. Very, very large values of TotalSeconds will cause the value to be set to zero.
On Windows (due to the Windows API being used), it is not possible to go back further than 1 January 1601.
Sample Code
You can use TotalSeconds to calculate elapsed seconds: