Totes Posted October 20, 2007 Posted October 20, 2007 Hello Everyone, This is a simple time calculation question: I have a calculation field to total hours from a start time and a stop time: (Time_End - Time_Requested) / 3600 It is set to return a number...what I would like to do is to have the resulting number show as below: if the returned number is 200 I would like for it to show as 2:00 how the heck do I do that with this calculation. Thanks, James
comment Posted October 20, 2007 Posted October 20, 2007 I don't know why you would want to do that, but you can try dividing by 360,000 instead of 3,600, then formatting the field as decimal, using ":" as the decimal separator.
Lee Smith Posted October 20, 2007 Posted October 20, 2007 That would show as a Time Format then? Have you tried to Format the number in Layout Mode using instead of . (i.e. colon instead of a periond)?
Totes Posted October 20, 2007 Author Posted October 20, 2007 Hi, Sorry I have not posted in a long time, and I forgot to explain what I am attempting to do. I have a start time and an end time field for a db here at work. I want to show a total of hours that were worked on a project…the only way I can get the number of hours to come out correctly is by using the calc above. However the number comes out as 200 (for two hours) and I need some way to show it as 2:00. Everything else I try does not work, that is the only thing I could chunk together that would calculate the hours for me. As always I am open to suggestions. Thanks again.
comment Posted October 20, 2007 Posted October 20, 2007 Something doesn't fit here. Your calculation returns the number of elapsed hours. If the result is 200, then 200 hours have elapsed - not two.
Totes Posted October 20, 2007 Author Posted October 20, 2007 (edited) Dangit!!! You are right, it took me all night before it hit me. In my mind I was thinking time (14:00 and 16:00) and I was getting a return of 2 hours plus some zeros. Which is correct if you lookt at it from my wrong way of thinking, the calculation was seeing 1400 and 1600. Then as I sat there this morning I saw it as plain as day. I had times of 14:00 and 16:00 and when the calculation is performed it does return 200, so it is calculating the numbers correctly, and not the time. I don’t have a clue as to what I was thinking when I posted this…sorry about that, back to the book for me. Edited October 20, 2007 by Guest
comment Posted October 20, 2007 Posted October 20, 2007 If StartTime is 14:00 and EndTime is 16:00, your calculation should return 2, not 200. If it returns 200, something is wrong. Are you sure your input fields are defined as Time fields? Do they have any auto-entry options enabled?
Totes Posted October 22, 2007 Author Posted October 22, 2007 Sorry for the late reply, did not feel well this weekend. Anyway, I took the entire calc out and started from the ground up (slowly this time) and when everything was back in place it seems to be working now. I cant find anything different from the original calc can the revised one…maybe it just did not like the way I typed it, I don’t know. Anyway thanks for the replies…and stay tuned for the next newbie question. James
Recommended Posts
This topic is 6313 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