Reference > TDBDateX Object > TDBDateX Object Methods > SinceMidnight Method (TDBDateX) |
SinceMidnight Method (TDBDateX)
The SinceMidnight method allows you to retrieve the total amount of seconds or minutes since midnight until the current time set to the time argument or the Value property.
object.SinceMidnight ([Time], [Option])
date is an optional variant (Date): a value that determines the underlying date. If not specified, the date set in the Value property will be applied.
option is an optional constant that determines whether to retrieve how many seconds or minutes since midnight.
The option argument has these settings:
0 |
Retrieve how many seconds since midnight. (Default) |
1 |
Retrieve how many minutes since midnight. |
A long integer representing the number of seconds or minutes since midnight. If the time argument is set to Null, this method returns -1.
To retrieve the amount of hours since midnight, refer to the Hour and the Hour24 properties. If the time argument is not specified, the time value set in the Value property will be applied.
See Also