We have a piece of equipment that weโre trying to track while itโs in operation. We have a โStartโ and โStopโ action to capture respective timestamps, and a โTotal Timeโ column to calculate total run time.
The equipment can run multiple times a day with variable amount of stops, so we want to be able to hit โStart/Stopโ multiple time with the โTotal Timeโ column updating with the actual time the equipment was running.
Is this possible without adding dozens of โTotal Timeโ columns for each occurrence?..
@Dialect_Junk
You can set a [START] column (Type: Time) and [CHANGE TIMESTAMP] column (Type: Change Timestamp). Bind this [CHANGE TIMESTAMP] column to watch any column data change you want. Than your you can calculate your [TOTAL TIME] column with an expression i.e.
TIME([CHANGE TIMESTAMP]) - [START]
Will this provide a running total to the [Total Time] column?
Say that today I have 2 sets of start/end times for my equipment:
I hit โStartโ at 9am, โEndโ at 11am for 2 hours.
I hit โStartโ at 2pm, โEndโ at 6pm for 4 hours.
Will my [Total Time] update to 6 hours?
@Dialect_Junk
You can do it this way:
You have [START]
and [END]
columns. Create 2 actions which will record a datetime stamp to these columns with Data: change a value of a column & use NOW()
as a value.
Create 2 Virtual Columns in your table:
(1) STEP_TOTAL with an expression of TIME([END]) - TIME([START])
(2) TOTAL with an expression of [TOTAL] + [STEP_TOTAL]
Levent, thanks for the suggestion. I gave that I try but the Virtual Column [TOTAL] is adding my [Total Time] column to the [STEP_TOTAL] column, essentially just doubling my [Total Time] column. Iโm sure Iโm missing somethingโฆ
This was interesting request from Mr @LeventK so I made a small sample app how you can do that. It will calculate total as minutes. The app name is โIN and OUTโ and you can find it from hereโฆ https://www.appsheet.com/portfolio/531778
Thank you, both!
User | Count |
---|---|
36 | |
33 | |
27 | |
23 | |
18 |