Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Display numbers in HH:MM and calculate p/hr rate...?


Recommended Posts

I have been playing around with our current database design and layout and I have hit another roadblock - is there a function, calculation or some way where I can enter the numeric number of 360 into a field and it will then convert this to HH:MM time format of 06:00?


A similar result would also be if I only entered in 15 (for 15 minutes) and the field would then display 00:15. I have looked through the 'Time...' section in the 'Format' menu and also tried to look at calculations and seem to be getting stuck.


I would prefer that I only create one field - perhaps it can refer to a validated calculation or script to achieve this result?


After this would be sorted out I would want to create a calculation - I call it "Cost" - that would give the value of $124.00 to 01:00 of time. To break it down for a 15 minute job the end result would be $31.00.


At the moment "Cost" is calculated the following way:


Artwork (number field) * 2.066666666


Any help would be appreciated, I have only been a member here for under a week but everyone seems very helpful and able to respond to most of my requests - I am just hopeful that I can achieve this result.


Thanks for reading, and look forward to some replies!


Regards, Shaun (sticks1977)

Link to comment
Share on other sites

We track surgery and recovery times to allow for several different types of billing. With Filemaker I use separate hour and minute fields since I think Filemaker treats this field as a function of clock time (although I could be very wrong).


I have found it to be easier to enter into two fields as opposed to entering the colon and then the code to find the colon, look to the left for hours and right for minutes.


Unfortunately, I was not able to get the traditional time format to work (unless you - or I - wrote the custom dialog that converted the entry and then displayed it with the colon).


For hours I use (Hours+ Minutes/60). If I need minutes (I don't) I would use (Hours*60+Minutes).


I do display the time in traditional format as (Hours & ":" & Minutes).

Link to comment
Share on other sites

Thanks for your reply, I am wondering if there is another way around it though...


I know in later versions of Filemaker you are able to use the current field name in a calculation and it will produce the result that I am looking for (in this case, entering 15 and it will display 00:15).


The calculation within this field is using the field name (such as 'Artwork' and dividing this entry by 60). It will have the result as a time field.


I am wondering if there is a function or command where you can specify the calculation to use the numeric number as your entry in that field. I do not really want to create another field for this calculation to refer to. Perhaps there is a number or field command to use the information that is entered by the user?


Any help would be appreciated - thanks for reading!

Link to comment
Share on other sites

You could make the entry field be a text field, then apply the time formatting with an auto-enter calc.


The downside is that the field would be a text field, and would not work well in calcs or sorting without conversion first. You might make a second time calculation field for use in other calcs and sorting.

Link to comment
Share on other sites

  • Create New...

Important Information

Terms of Use