gwent Posted January 31, 2005 Share Posted January 31, 2005 Good Morning, I have a formula that displays elapsed time as a decimal i.e. 2.5 minutes that is calculated by deviding total seconds elapsed by 60. I would rather display results as minutes and seconds i.e. 2 minutes 30 seconds. Does anyone have any ideas? Thanks, greg Link to comment Share on other sites More sharing options...
comment Posted January 31, 2005 Share Posted January 31, 2005 Time ( 0 ; 0 ; elapsed time in seconds) Link to comment Share on other sites More sharing options...
gwent Posted January 31, 2005 Author Share Posted January 31, 2005 Thanks "comment", but would you please explain what this will do just a little? My known value is total elapsed time in seconds. I.E. Average Service time is 150 Seconds. How does this help me display Average Service Time as 2:30 Minutes Thanks greg Link to comment Share on other sites More sharing options...
comment Posted January 31, 2005 Share Posted January 31, 2005 Time, in Filemaker, is the number of seconds since midnight. Therefore 150 already is 2:30. All that's left is to display it as such. If it is a calculated field, set the result of the calculation to Time, and you're done. How did you come to have the time as # of seconds in the first place? Link to comment Share on other sites More sharing options...
gwent Posted January 31, 2005 Author Share Posted January 31, 2005 OK, I'll try that Thanks Link to comment Share on other sites More sharing options...
-Queue- Posted January 31, 2005 Share Posted January 31, 2005 Time( ) will give you results in a clock format. I think you want to see 'minutes' and 'seconds'. Let([ M = Div( totalseconds; 60 ); S = Mod( totalseconds; 60 )]; Case( M; M & " minute" & Left( "s"; M > 1 ) ) & Case( M and S; " " ) & Case( S; S & " second" & Left( "s"; S > 1 ) ) ) Link to comment Share on other sites More sharing options...
gwent Posted January 31, 2005 Author Share Posted January 31, 2005 Queue Your the man!!!!! That's exactly what I needed. Wher the H.... did you learn that. I want to go to your school:) Many Thanks greg Link to comment Share on other sites More sharing options...
-Queue- Posted January 31, 2005 Share Posted January 31, 2005 It just takes practice, though it doesn't hurt to be a calc field either. Note that Left( "s"; M > 1 ) is equivalent to Case( M > 1; "s" ). I just used it to help avoid any Case confusion. So it's really just combined Cases, which aren't too difficult once you have your logic in place. But, if I ever start a school, I'll let you know. Link to comment Share on other sites More sharing options...
gwent Posted February 2, 2005 Author Share Posted February 2, 2005 Queue [ QUOTE ] It just takes practice, though it doesn't hurt to be a calc field either. Did you mean "calc fiend" Again thanks....My Client loves it. greg Link to comment Share on other sites More sharing options...
-Queue- Posted February 2, 2005 Share Posted February 2, 2005 Hmm, yes, a bit of a Freudian slip there. Link to comment Share on other sites More sharing options...
gwent Posted April 27, 2005 Author Share Posted April 27, 2005 Queue, You helped me the the calc shown below and I have an additional question. The result is fantastic and my client loves it. Now she wants me to average the average. [ QUOTE ] Time( ) will give you results in a clock format. I think you want to see 'minutes' and 'seconds'. Let([ M = Div( totalseconds; 60 ); S = Mod( totalseconds; 60 )]; Case( M; M & " minute" & Left( "s"; M > 1 ) ) & Case( M and S; " " ) & Case( S; S & " second" & Left( "s"; S > 1 ) ) ) [/ QUOTE ] This calc gives me the average of 5 possible Service Time entries in Minutes and Seconds on any given Inspection that Service Times were recorded. Now I need to average the results from a found set of Inspections. I know I need to count Inspection results >0 in the Service Time field but where to goe from there? Please help.... greg Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.