Search the Community
Showing results for tags 'add'.
-
Hello; Do views and tables have different performance characteristics? Or, is their only purpose to provide multi-table data sets? Consider these two scenarios: tbl_1 -> fld_1 | fld_2 | fld_3 | fld_4 | fld_5 | fld_6 frm_1 -> tbl_1.fld_3 | tbl_1.fld_5 Will the following View save me data usage or speed up the call? (or do anything else) view_1 -> tbl_1.fld_3 | tbl_1.fld_5 ---------------------------------------------------------------------------- frm_2 - tbl_1.fld_1 | tbl_1.fld_2 | tbl_1.fld_3 | tbl_1.fld_4 | tbl_1.fld_5 | tbl_1.fld_6 Will the following View slow down the call? (or do anything else) view_2 - tbl_1.fld_1 | tbl_1.fld_2 | tbl_1.fld_3 | tbl_1.fld_4 | tbl_1.fld_5 | tbl_1.fld_6 THANKS
-
Hello, I'm having difficulty with my time formula for a specific scenario. It is working correctly but producing too much time in some instances. I'm using a calculated field with the following formula to find the total time worked each day: cast (Datediff(hour, [@field:Start_TIme], [@field:End_Time])%24 as varchar)+' hours,'+ cast (Datediff(minute, [@field:Start_Time], [@field:End_Time])%60 as varchar)+ ' minutes' The formula is working when: The time calculated is more than an hour (i.e. 2:00 PM to 4:45 PM) = 2hrs, 45 minutes (CORRECT RESULT) or The time calculated is less than an hour but within the same hour of the day (i.e. 2:00 PM to 2:23 PM) = 0hrs, 23 minutes (CORRECT RESULT) The formula is NOT working when: The time calculated is less than an hour across DIFFERENT hours (i.e. 2:50PM - 3:05PM) = 1hrs, 15 minutes (INCORRECT RESULT) The hour should be '0' as the total time worked is '15' minutes only. I'm not sure if I can build a condition into the already existing formula(s) or if a new formula(s) is required. The standard datediff function also produces the same result. I've tried other code located online but have not been successful at removing the hour that appears in error. I've searched the CASPIO forum but was not able to locate a like issue. Any help or suggestions would be much appreciated. Thank you!
- 1 reply
-
- time
- calculation
- (and 8 more)