Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › Sum Calculation of Time Field
- This topic has 6 replies, 2 voices, and was last updated 1 year, 9 months ago by Brendan.
-
AuthorPosts
-
March 21, 2023 at 11:34 AM #49177
Ronald KroekerParticipantWould any person be able to share the Calculation Formula to sum time values from 1 field?
I have an estimated time field on tasks and would like to run a calculated field of all the tasks that I have chosen (I have a day journal which I can choose the tasks to allocate for the day and want to know if I have overbooked my time for the day).
ThanksMarch 21, 2023 at 8:17 PM #49182
BrendanKeymasterHi Ronald,
Is your Time value a Time field or is it a Number field with one of the time based Number Formats applied to it?
If it’s a Number field, then please note that the values stored in the database are in number of seconds. So if you were booked for 1 hour, that would be stored as 1hr * 60min * 60sec = 3600 seconds.
So to add your time fields together, just add them up normally:
Time 1 + Time 2 + Time 3
and so on. And if your Calculation field also has one of the Time number formats set on it, Tap Forms will do the math for you and convert it back into HH:MM or whatever one of the formats you chose.I would also suggest that you don’t use the Time field to record durations. It’s not the same, even though it might look the same. For example, 12:30 pm represents the specific time within a day. But 12:30 represents 12 hours and 30 minutes. Doesn’t matter what time of the day it is.
March 22, 2023 at 3:52 AM #49183
Ronald KroekerParticipantThanks for your time Brendan;
I indeed am using a number field formatted as “HH:MM”. Forgive my poor nomenclature as I attempt to focus on my problem.
I have a Daily Journal which I organize my day with and in that form I have a Many to Many union with a Tasks form. I can pick 1 or more tasks and each task has an estimated time. I have put in a calculated field on my daily journal, “Booked Time”(number formatted as “HH:MM”) to use for the total of “Estimated Time” relative to all the Tasks for that chosen day in my journal. The problem I am having is what specific formula do I use to aggregate total the “Estimated Time”,of the Tasks I have picked, in my calculated field?
Example: ???sum or total or other command???([Estimated Time])
I am looking for the aggregate total of the field “Estimated Time” which might have 1 or more values?Thanks Again for the help and patience.
P.S. I should mention that I am using IOS.- This reply was modified 1 year, 9 months ago by Ronald Kroeker.
- This reply was modified 1 year, 9 months ago by Ronald Kroeker.
March 22, 2023 at 5:12 AM #49186
Ronald KroekerParticipantBrendan;
I ended up going a different route:
I created a Table Field, populated table from other form and then I could use formula;
([TOTAL::”Table Name”::”Table Field”]) in a calculated field.Thanks
March 22, 2023 at 10:52 AM #49189
BrendanKeymasterHi Ronald,
Yup. That’d do it. I wasn’t aware you were using a relationship to hold the duration values.
A Table field is good too.
Thanks,
Brendan
March 22, 2023 at 11:14 AM #49191
Ronald KroekerParticipantBrendan;
Again, let me thank you and the product you have made available. I have historically been a Microsoft user (Access) and have always been frustrated by limitations with device access. I have been so excited after getting an iPad, as well as trying to migrate my understanding, that I went out and picked up an iPhone to sync with. I am limited in my understanding and abilities, but still a game old man. This gives me much to work on during long Alberta winters…lol.
Again Thanks for the Patience.March 23, 2023 at 1:14 PM #49194
BrendanKeymasterHehe… I know the Alberta winters. I live in Calgary and I’m just eagerly awaiting all the snow to melt so I can get back to West Bragg Creak on my mountain bike!
-
AuthorPosts
You must be logged in to reply to this topic.