There isn’t an aggday that takes a parameter like that yet but depending upon your level of technical tomfoolery it can be done in a few ways.
One option would be to beemind “number of quarterhours” or “number of halfhours”.
Another would be to use IFTTT and their advanced filters. You’d set up one goal that you just put time into, and another goal that you’d mirror filtered datapoints into, with the real pledge and rate and stuff like that. There’s some semi-instructions here: https://forum.beeminder.com/t/bed-time-with-ifttt/4738 and https://forum.beeminder.com/t/triathalon-training-goal/3814/12
Another would be to use the API and set up a filter that way.