Discussions

 View Only
  • 1.  Max Time in Child Records

    Posted 26 days ago
    Anyone have a work around to get the Max time from a child record? Maximum Summary field does not work on times, only numbers and dates.

    There must be a work around I am not thinking of? Maybe convert the time to a 24 hour clock, and then to a number? Then max the number and convert back?

    ------------------------------
    Mike Tamoush
    ------------------------------


  • 2.  RE: Max Time in Child Records

    Posted 26 days ago
    You can make a Duration field 

    [my time of day field] - ToTimeOf Day("12:00 am")

    I'm assuming that you can do a summary Maximum on that. Then if you need to convert that back to a time of day field you could make a new field 

    ToTimestamp(Today(), ToTimeOfDay("12:00 am")) + [My summary Max duration field]

    - ToTimestamp(Today(), ToTimeOfDay("12:00 am"))

    I don't think you are allowed to add duration to a time of day field.  It's a vague memory but I did not have time to test.

    .

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Max Time in Child Records

    Posted 24 days ago
    Mike,

    I tested @Mark Shnier (Your Quickbase Coach)'s suggestion.

    Here is my Child Table Data



    Then my Parent Record sees this

    So then the last step is to convert the Duration back into Time on the Parent Record with a second Formula field. 

    Good suggestion by Mark as always.  I will have to remember this for the future.



    ------------------------------
    Don Larson
    ------------------------------



  • 4.  RE: Max Time in Child Records

    Posted 20 days ago
    Also confirming this worked great. Additionally, to change back to Time, I just needed a snip of Marks code:

    ToTimeOfDay("12:00 am")) + [My summary Max duration field]

    ------------------------------
    Mike Tamoush
    ------------------------------