Salesforce and other SMB Solutions are coming soon. ×

# Time Conversion

## Recommended Posts

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

##### Share on other sites

Time ( 0 ; 0 ; elapsed time in seconds)

##### Share on other sites

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

##### Share on other sites

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?

##### Share on other sites

OK, I'll try that

Thanks

##### Share on other sites

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 ) )

)

##### Share on other sites

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

##### Share on other sites

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.

##### Share on other sites

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

##### Share on other sites

Hmm, yes, a bit of a Freudian slip there.

##### Share on other sites

• 2 months later...

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?

greg

#### Archived

This topic is now archived and is closed to further replies.

• ### Images

• By Soliant Consulting,
• By Soliant Consulting,
• By Soliant Consulting,
• ### Forum Statistics

• Total Topics
33.7k
• Total Posts
141.5k
×
×
• Create New...