I’d like to build on what @WillowMobileSystems has written by sharing a little of what I’ve learned about how to add times to the current time ( now() ).
One way to do this, which I think is close to what John is indicating, is to have the clients select or type in a number hours. That can be stored as a simple number. It can then be converted into a duration as follows:
concatenate([Number of hours],":00:00")
This expression might be used in a virtual column that is of the “duration” type. You will then be able to add that to the current time in another column.
If you’d like to add these together in one column, I’d suggest the following:
now()+(time(concatenate([Number of hours],":00:00"))-“00:00:00”)
It’s a bit convoluted because time() and -“00:00:00” are required to turn it into a duration that can be added to now(). I learned this trick, by the way, from @Steve.
This would be easier if we had a DURATION() expression (similar to TIME() ), but, alas, we don’t.
Actually, I was originally thinking of a human-to-machine translation table. Where you list text value for people to read/use like “1.5 hours”, “30 minutes”, etc and then translate that to the duration equivalent that is used in the expression.
But, I love how this can calculate the duration on the fly. This example will work great if the Duration choices are all in hours. I am not certain of @Chris_Jeal requirement.
How much more complicated does the calculation get if you want to support half-hours, i.e. add 1.5 hours ?
Now I just need a workflow triggered by certain times of the day to send the workflow with the snapshot() expression, got this to work manually but still haven’t figured out how to fully automate this yet.