TRUNC is still your solution to it.. TRUNC truncates the integer parts and sets that to your integer field.. then you take the remainder and go on to find your minutes and then seconds.. Its like creating your own modulus function..
Cheers Joe From: Jase Brandon Sent: Tuesday, March 22, 2011 7:18 PM Newsgroups: public.remedy.arsystem.general To: [email protected] Subject: Re: Trying to convert Integer field value into Hours divided by 60. ** Thanks Christie and Fred, I should have mentioned I've already tried using Real, Integer, Char, etc. I should have stated: "I want to be able to take a value of "61" in any type field, and convert that somehow to be interpreted as 'Total Time' = "1.01" or "One Hour One Minute", etc.. in any format. What would you guys suggest for accomplishing this goal? I'm admittedly tired and frustrated right now. Thanks in Advance... :-) Jase :-) On Tue, Mar 22, 2011 at 6:41 PM, Grooms, Frederick W <[email protected]> wrote: Since you are doing integer math it is truncating the remainder You state 'Total Time' is an integer so it can never show 6.08 Fred -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:[email protected]] On Behalf Of Jase Brandon Sent: Tuesday, March 22, 2011 5:17 PM To: [email protected] Subject: Trying to convert Integer field value into Hours divided by 60. ** Hello All, I am writing a custom time tracking app and have been banging my head on the keyboard for a few hours with the below. I have one Active Link and three fields: 'Minutes', 'Hours', and 'Total Time' all are Integer/Numeric Spinner/Display Only. 'Minutes' and 'Hours' are populated by a COLSUM functions on a table field and that part is working great. I want to be able to take 'Minutes' and 'Hours' and populate 'Total Time' field, so a user can do a date range search on Monday-Friday and see if they have entered a full 40 hours. My problem is this: 'Hours' and 'Minutes' both work great and are populated with the correct values from the table field using COLSUM. I have an Active Link with three Set Fields. Action 1: Set Fields 'Hours' = COLSUM(Column38). Action 2: Set Fields 'Minutes' COLSUM(Column39). Action 3: Set Fields 'Total Time' = 'Hours' + ('Minutes' /60) Action 3 is what is causing the pain. Ex Action 1 uses COLSUM and sets the 'Hours' as 4 hours, and that's correct. Action 2 does the same COLSUM function and comes up with 128 Minutes, and that's correct. Action 3 sets 'Total Hours' as 6 Hours with NO minutes. So, the workflow it's picking up the fact that when I divide by 60 in action 3 it works, but... it's not taking into account the other 8 minutes. So the problem is that when 'Hours' = 4, and 'Minutes' = 128... I get the result in 'Total Time' as 6, instead of 6.08. I need the 'Total Time' field to populate with exact Hours/Minutes. The only thing I have come close with if using another Decimal Integer field with a Precision of 2 as 'Total Time'.. but.. that gives me a time of "2.13" for "2 Hours and 8 Minutes", as it should. 13% of 60 is 8. How can I overcome this? I haven't done anything like this in quite awhile and I am admittedly stumped. ARS 7.1 Windows 2003 ITSM 7.0.0.3 Thanks in Advance to All with any advice for me. :-) Cheers, Jase Brandon Senior Remedy Developer Quality Technology Services 300 Satellite Blvd Suwanee, GA 30024 _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are" _attend WWRUG11 www.wwrug.com ARSlist: "Where the Answers Are"_ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

