Ocean West Posted October 1, 2010 Share Posted October 1, 2010 Need a custom function that calculates the duration of two fields that are formatted: ####:##:## filemaker doesn't recognize milliseconds. Link to comment Share on other sites More sharing options...
comment Posted October 1, 2010 Share Posted October 1, 2010 (edited) Assuming those are text fields, try: GetAsTime ( Replace ( EndTime ; 9 ; 1 ; ".0" ) ) - GetAsTime ( Replace ( StartTime ; 9 ; 1 ; ".0" ) ) --- P.S. Are you sure those are milliseconds at the end? That would be a very weird way to put them: what if there are more than 99 (there can be up to 999)? The format looks like timecode, with frames at the end. Edited October 1, 2010 by Guest Link to comment Share on other sites More sharing options...
Raybaudi Posted October 1, 2010 Share Posted October 1, 2010 filemaker doesn't recognize milliseconds. FileMaker recognize even milliseconds, but they are a fraction of seconds. Try: Case( PatternCount ( text ; ":" ) = 3 ; GetAsTime ( Replace ( text ; Position ( text ; ":" ; 1 ; 3 ) ; 1 ; Left ( 1/2 ; 1 ) ) ) ; GetAsTime ( text ) ) Link to comment Share on other sites More sharing options...
Raybaudi Posted October 1, 2010 Share Posted October 1, 2010 ".0" Why that zero ? (there can be up to 999) there can be up to 999999 Link to comment Share on other sites More sharing options...
comment Posted October 1, 2010 Share Posted October 1, 2010 there can be up to 999999 Not if they are milliseconds. Link to comment Share on other sites More sharing options...
Raybaudi Posted October 1, 2010 Share Posted October 1, 2010 Aren't they 999.999 milliseconds ? But I was pointing on the fact that FileMaker recognize decimals of second till the sixth power, not more. Link to comment Share on other sites More sharing options...
comment Posted October 1, 2010 Share Posted October 1, 2010 We have a context issue here: I was referring to the given format ####:##:##. If the last two digits are milliseconds, then there is a problem how to express half a second. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 4969 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