How Do I Calculate the Hour/Minute/Seconds Portion of a Given Time Value? (Magic xpa 2.x)
When you need to work with the hour, minute, or seconds portion of a time, you can calculate the values by doing some arithmetic. However, there are some good functions to make the process a lot easier. Using the Hour(), Minute(), and Second() functions will easily return those parts of time field.
-
Hour(time) returns the hour portion of the time, as a number.
-
Minute(time) returns the minute portion of the time, as a number.
-
Second(time) returns the seconds portion of the time, as a number.
Where time is any time variable (or a hard-coded time, such as '16:10:14'TIME, or an expression that evaluates to a time).
Hint: If you need milliseconds, you need to use the mTime() function.
How Do I Retrieve the Current Time Using Milliseconds Precision?
The Online and Rich Client Samples projects (program DT15 and RDT15)