Jump to: navigation, search


A datatype called DateTimeDiff is used on the backend for this app to record the difference between the start time and end time recorded.
When the user activates the timer, a start time is recorded by the app, and included as part of a new record on ginstr web.
When the timer is stopped, an end time is added to the record, but the app does not calculate the final difference in the times recorded.
The DateTimeDiff value is calculated automatically on ginstr web by subtracting the start time from the end time.
For this app, the DateTimeDiff value is stored in the column named {{{dtd}}}, in the table named {{{table}}}.
The time is stored in this column in decimal hours (e.g. 1 hour and 15 minutes is stored as 1.25, meaning 1.25 hours passed between the recordings made).
An advantage of this is that the user can safely update either the start or end times recorded in the {{{start}}} and {{{end}}} columns.
The difference in the times will be calculated automatically for each updated value and displayed in the {{{dtd}}} column.