Discussions

 View Only
  • 1.  Max Time in Child Records

    Posted 01-12-2023 17:21
    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 01-12-2023 17:36
    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 01-14-2023 09:45
    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 01-18-2023 15:26
    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
    ------------------------------