Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hey,

I'm trying to format a date calculation and I'm a bit stuck. I'm trying to track the number of days, hours, minutes it took for a project to be completed. I used ProjectFinishedTimeStamp - ProjectStartedTimeStamp. The calculation Result is TIME.

How do convert the result of 6557:17:39 into 'D' days :) 'H' Hours : 'M' Minutes?

Much appreciated,

P

Have you looked at the custom Functions on Brian Dunnings site?

http://www.briandunning.com/filemaker-custom-functions/list.php

You may find what you need there.

Here's one possible way:

Let ( [

diff = GetAsTimestamp ( ProjectFinishedTimeStamp - ProjectStartedTimeStamp ) ;

days = Day ( diff ) - 1 ;

hours = Hour ( diff ) ;

minutes =Minute ( diff )

] ;

days & ":" & hours & ":" & minutes

)

The result must be Text.

---

EDIT:

Oops, I have accidentally omitted an important part of my post.

The above formula is a convenient shortcut, but it is limited to periods of less than 31 days. If the elapsed period may exceed this limit, it's necessary to move to a slightly more cumbersome (but always correct) version:

Let ( [

diff = ProjectFinishedTimeStamp - ProjectStartedTimeStamp ;

days = Div ( diff ; 86400 ) ;

hours = Div ( Mod ( diff ; 86400 ) ; 3600 ) ;

minutes = Div (Mod ( diff ; 3600 ) ; 60 )

] ;

days & ":" & hours & ":" & minutes

)

Edited by Guest

  • Author

Thank you Comment.

I was stuck on how to break down the seperate numbers from days:hours:minutes. The Div and Mod works great. Thanks a bunch.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.