tmas73 Posted September 19, 2003 Posted September 19, 2003 I have a mini dv database in this db I have for each portal row one scene with time code, my goal its to add up all the time of each scene. Please see picture. portal sum.jpg The time fields are split up in 3 fields. Hours Minutes and Seconds. Any ideas in how to calculate this task?? Thank You!
ernst Posted September 19, 2003 Posted September 19, 2003 Hi, In each portal row record you coulds make a calculated field that is the total of hours, minutes and seconds, expressed in seconds: Hours * 3600 + Minutes *60 + Seconds Assuming you'd call this calculation cLineTotalTime you could calculate the portal total of seconds via: Sum(PortalRelation::cLineTotalTime). Let call this one cPortalTotal. Now you need to calculate this portal total back to TotalHours, TotalMinutes and TotalSeconds as follows: TotalHours = Hour(cPortalTotal) TotalMinutes = Minute(cPortalTotal - (TotalHours * 3600)) TotalSeconds = Seconds(cPortalTotal - (3600 * TotalHours) - (60 * TotalMinutes)) Hope this helps, Ernst.
tmas73 Posted September 19, 2003 Author Posted September 19, 2003 Thanks so much that worked perfect! If I use the time format in the field I dont even have to do your last step in converting the info!! Thanks
ernst Posted September 20, 2003 Posted September 20, 2003 tmas73 said: If I use the time format in the field I dont even have to do your last step in converting the info!! Smart!
Recommended Posts
This topic is 7736 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now